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

Moving a wslg window with AltDrag breaks mouse interaction (need local move support) #324

Open
nevyn opened this issue Jun 23, 2021 · 6 comments
Labels
enhancement New feature or request window-management Window management issue

Comments

@nevyn
Copy link

nevyn commented Jun 23, 2021

  1. Install AltDrag
  2. sudo apt install dbus-x11 gnome-terminal
  3. dbus-launch gnome-terminal
  4. Hold Windows key and drag anywhere on the gnome-terminal to move the window. It is moved as expected
  5. Any subsequent mouse interactions with the wslg window has its mouse coordinates offset by the same amount of pixels that the window was moved.

For example, moving the window 100 px to the right means that if you click what is visually 0,0 in the window, the click will end up at 100,0.

Windows build 21390.co_release.210521-1658

$ wsl --status
Default Distribution: Ubuntu
Default Version: 2

Windows Subsystem for Linux was last updated on 2021-06-23
WSL automatic updates are on.

Kernel version: 5.10.16
@hideyukn88 hideyukn88 added enhancement New feature or request window-management Window management issue labels Jun 23, 2021
@hideyukn88 hideyukn88 changed the title Moving a wslg window with AltDrag breaks mouse interaction Moving a wslg window with AltDrag breaks mouse interaction (need local move support) Jun 23, 2021
@hideyukn88
Copy link
Member

@nevyn, thanks for reporting the issue. Yes, this is one of known limitation with WSLg today. If window is moved by Windows without involving WSLg, WSLg doesn't know the window has been moved, thus such misalignment occurs. In order to support this scenario properly, we will need to add so-called "local move" feature in RDP to WSLg, and we will plan to support this in future release. Thanks for trying out WSLg!

@crramirez
Copy link
Contributor

@nevyn What happens if you Alt+Drag the Linux Window with AltDrag Disabled?

@hideyukn88
Copy link
Member

@crramirez @nevyn, as you might notice our rdprail-shell does support this, just like weston's desktop-shell. But it's disabled by default. If you want to enable, you can add below to weston.ini, and rebuild system-distro VHD following the instruction in README.md. We are looking into what would be the best way for user to customize the behavior of system distro without rebuilding system-distro. Thanks!

[shell]
binding-modifier=alt

@darkguy2008
Copy link

darkguy2008 commented Oct 24, 2021

I used this as a workaround, blacklisting the RAIL_WINDOW classes (and Progman too, to avoid alt-dragging the desktop 😅) so I don't accidentally alt-drag WSLg windows.

image

However, it isn't the ideal solution. I looked at the CONTRIBUTING.md file with some instructions to rebuild the VHD image but it seems a tad overkill and cumbersome for just changing an INI value (that IMO should be the default).

@hideyukn88 is there any known estimate when we can see this working or a way to easily modify the weston.ini file without following such a complicated process?

Thanks :)

P.S. Now that we're here, Windows should natively have some kind of alt-dragging windows...

@darkguy2008
Copy link

darkguy2008 commented Feb 3, 2022

@hideyukn88 hello! Are there any news regarding this as of 2022? Any better way than to rebuild the full VHD image for just editing a single file? Maybe a hard/soft link or something on the Linux side? Thanks!

@mirage335
Copy link

mirage335 commented Aug 18, 2023

Going from the opposite direction, I use mouse macros with 'Alt+Space' . Infuriatingly, this does not work with WSL windows. Modifying this autohotkey script ( https://www.autohotkey.com/docs/v1/scripts/EasyWindowDrag_(KDE).ahk )to only Alt+Click move/resize WSL windows encounters this bug.

So if the titlebar or edges of the window are difficult to get to, WSL windows cannot be moved/resized at all. That is rather bad.

Meantime, running 'plasma' through 'xephyr' is more usable in this regard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request window-management Window management issue
Projects
None yet
Development

No branches or pull requests

5 participants