Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FancyZones does not recognize WSLg and WSA (Android) windows #10942

Open
1 task done
rbeesley opened this issue Apr 26, 2021 · 15 comments
Open
1 task done

FancyZones does not recognize WSLg and WSA (Android) windows #10942

rbeesley opened this issue Apr 26, 2021 · 15 comments
Labels
Area-App Compat Issues revolving around application compatibility across PowerToys Priority-1 Bug that is high priority Product-FancyZones Refers to the FancyZones PowerToy Status-Blocked We can't make progress due to a dependency or issue

Comments

@rbeesley
Copy link

Microsoft PowerToys version

0.35.0

Running as admin

  • Yes

Area(s) with issue?

FancyZones

Steps to reproduce

  1. Get WSLg working in a distribution.
  2. Open an X11 application, such as KDE Thunar. (The application chosen will depend on the distribution installed and environment).
  3. Start moving the X11 window and use the FancyZones shortcut key to activate zones.

Bug: The zones will not show and the X11 app will not resize to a zone.

  1. Press the FancyZones shortcut key and then click and drag the title bar of the X11 app to activate zones.

Bug: The zones will not show and the X11 app will not resize to a zone.

PowerToysReport_2021-04-25-17-01-31.zip

✔️ Expected Behavior

X11 apps have worked since WSL1. There was additional work which needed to be done that WSLg helps solve and improves. For WSL1 and WSL2 before WSLg, you had to run an X-Server and set the DISPLAY environment variable, and this would show the window. Kali Linux has a Windows executable available in the distro which is rather ingenious, kex, via which Kali bundles a Windows X-Server within WSL and can launch in several modes, notably one which is "seamless" and opens a window very similar to WSLg in that it looks like another Windows application, and there is another mode which works through RDP similar to how WSLg seems to be doing it.

The expectation with X11 apps launched via WSLg is that they'd perform the same way as Kali's seamless, with respect to how they'd work with FancyZones. X11 apps moved to different zones snap as expected, like other Windows applications.

❌ Actual Behavior

With WSLg, this does not work. Fancy Zones does not recognize that the hotkey is being pressed and does not provide zones, so it will not snap. Since applications running through WSLg respond like any other application on Windows, it would be expected that zone snapping would work as well. Launching an X11 app through one of the WSLg Start Menu icons seems to expose itself slightly differently to Windows as inspected with Process Explorer, but both behave the same way.

It seems very likely that WSLg is swallowing the hotkey event required for FancyZones to work and/or because the window doesn't expose itself to the process tree in the same way as WSL1 and earlier WSL2 methods of getting X11 applications running, that providing this functionality is actually a WSL issue rather than FancyZones, but this is notably different behavior than expected considering how it worked before with VcXsrv configurations.

Other Software

Windows 10 Pro 21364.co_release.210416-1504
Kali Linux (PS > WSL -d kali-linux)

  • Thunar 4.16.3 ($ sudo apt install x11-apps && thunar)
  • Xeyes ??.??.?? ($ sudo apt install x11-apps && xeyes)
@rbeesley rbeesley added Issue-Bug Something isn't working Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Apr 26, 2021
@enricogior enricogior added FancyZones-App Compat Product-FancyZones Refers to the FancyZones PowerToy Resolution-External External issue, unrelated to PowerToys and removed Issue-Bug Something isn't working Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Apr 26, 2021
@crutkas crutkas removed the Resolution-External External issue, unrelated to PowerToys label Apr 26, 2021
@crutkas
Copy link
Member

crutkas commented Apr 26, 2021

@enricogior this is something we'll have to get working

@crutkas crutkas added this to the Post stabilization milestone Apr 26, 2021
@crutkas crutkas added the Priority-1 Bug that is high priority label Apr 26, 2021
@enricogior
Copy link
Contributor

@crutkas
we need system level support.

@crutkas
Copy link
Member

crutkas commented Apr 26, 2021

kicking off emails :)

@enricogior
Copy link
Contributor

@crutkas
not only we need to be notified that a move starts, we also need an API to send a resize event that will be received by the application, otherwise we end up with the identical problem we already have with Hyper-V, where we can resize the external container but not the inner guest.

@just1a-person
Copy link
Contributor

related: microsoft/wslg#22

@rbeesley
Copy link
Author

@itsme-alan
That actually makes sense that FancyZones should have issues for the same reasons that Snap doesn't work.

@tinkerpunktheprol
Copy link

Is this feature going to be implemented any time soon?

@solispauwels
Copy link

Absolute need this with my ultra-wide screen!

@tinkerpunktheprol
Copy link

tinkerpunktheprol commented Nov 18, 2022

Absolute need this with my ultra-wide screen!

I discovered GWSL just after posting this and it does everything we'd expect WSLg to do, and has done so for a while.

Edit: You can find it on the Windows Store.

@solispauwels
Copy link

solispauwels commented Nov 18, 2022

@tinkerpunktheprol Thank you very much, in the past I use Xming, that is free and works too, or X410 , But, this repository is about PowerToys and this issue about WSLg.

@solispauwels
Copy link

WSLg have a very good compatibility with vGPU, not available on old classic x11 forwardings like Xming.
vGPU is very useful also for things like Windows subsystem for Android. and I saw we have the same issue there (#14538).

@crutkas crutkas added the Status-Blocked We can't make progress due to a dependency or issue label Jul 31, 2023
@crutkas crutkas changed the title FancyZones does not recognize WSLg windows FancyZones does not recognize WSLg and WSA (Android) windows Jul 31, 2023
@Kermit
Copy link

Kermit commented Sep 19, 2023

@crutkas it's possible to snap WSLG window to the screen edge (only with keyboard, mouse snapping still doesn't work). Does it change anything for this task? Moving window between zones just with keyboard would be super useful.

@MathanGeurtsen
Copy link

MathanGeurtsen commented Dec 12, 2023

Would it be possible to have FancyZones refuse to move WSLg windows? For me FancyZones seems to move the windows visually, but the window itself (the x server?) isn't aware of the move/resize, so mouse interaction breaks. I'd rather have FancyZones refuse the attempt instead of ending up in a broken state.

(workaround if you're trying to get out of this broken state: for me WIN+ up-arrow sets the WSLg window to full screen, and then WIN+up-arrow moves it back to the "correct" place on the monitor visually, which aligns with what the x server thinks, so mouse interaction works again.)

(e: styling issue)

@conan
Copy link

conan commented Apr 16, 2024

For me, with FancyZones enabled, dialogue windows created by WSLg apps (e.g. Intellij) appear in a different place to their interaction area if I have "Move newly created windows to their last known zone" enabled, and appear correctly if it's disabled.

With the setting enabled, dialogues all appear in the top left of the screen, but the interaction area remains wherever they're supposed to be.

No other FancyZones settings make a difference, apart from disabling FancyZones altogether which has the same effect as disabling "Move newly created windows to their last known zone".

@3Fish
Copy link

3Fish commented Jun 28, 2024

The issue persists. Is there any progress on fixing this? Or is the only solution to buy a third-party tool like GWSL?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-App Compat Issues revolving around application compatibility across PowerToys Priority-1 Bug that is high priority Product-FancyZones Refers to the FancyZones PowerToy Status-Blocked We can't make progress due to a dependency or issue
Projects
None yet
Development

No branches or pull requests

10 participants