microsoft / wslg

Enabling the Windows Subsystem for Linux to include support for Wayland and X server related scenarios
MIT License
10.14k stars 303 forks source link

Graphical applications aren't responding to mouse inputs on specific monitor configurations #1094

Open alex73630 opened 1 year ago

alex73630 commented 1 year ago

Windows Version

Microsoft Windows [version 10.0.22621.1992]

WSL Version

1.2.5.0

Are you using WSL 1 or WSL 2?

Kernel Version

5.15.90.1

Distro Version

Ubuntu 22.04

Other Software

Any X Server based applications installed in a WSL distro Tested with: JetBrains DataGrip 2020.3.2 virt-manager 4.0.0 Firefox 116.0

Repro Steps

Expected Behavior

When the third monitor is configured as "under" the primary monitor, mouse interactions are working as shown on this screenshot: image

Actual Behavior

When the third monitor is configured as "on top" of the primary monitor, the window can't be interacted with the mouse as shown on this screenshot: image

Diagnostic Logs

No response

alex73630 commented 1 year ago

If the second monitor is disabled and only the first and third monitors are active in the same configuration (primary monitor "under" and the other one "on top"), mouse interactions are working as expected.

EDIT: although I noticed that the cursor is way down on the taskbar on the screenshot whereas on my screen it was hovering the "Add connection" option

Here's a screenshot for more clarity: image

ghost commented 1 year ago

This sounds like something you'll want to bring up here: https://github.com/microsoft/wslg/issues/new/choose

I'm transferring the issue, but you'll want to provide them with information in their template.

rafcis02 commented 1 year ago

I have the same issue. I work with laptop screen and external monitor - the issue occur no matter of displays arrangement or which is set as primary. It works only when I unplug the external monitor. I can confirm the issue is related with the cursor - whenever I want to click on task bar it actually clicks few line below on menu bar, in the editor when I click on specific line it set cursor a few lines below...

Also I noticed that WSLg window does not have that frame around any more, like below, so it might be related image

Intellij IntelliJ IDEA 2023.2 Windows 11 22H2 - Version 10.0.22621 Build 22621 WSL version: 1.2.5.0 WSLg version: 1.0.51

rafcis02 commented 1 year ago

I downgraded IntelliJ to version 2023.1 and this issue does not occur. Also that white window frame got back.

Then I thought that it might be an issue with New UI of IntelliJ. I got back to 2023.2, disabled New UI in settings, restarted it and it worked. Then I re-enable New UI and restarted IntelliJ and it works without any issue now. EDIT: It only sometimes works with New UI enabled - don't know exactly under what conditions

decarbureted commented 5 months ago

I have the same issue, only I can't figure out what monitor configuration will work when I'm using multiple monitors. I'm using a laptop, which I have closed and plugged into a dock with two identical monitors. The layout is as follows, with display 1 as primary (had it as display 2 as primary, but decided to try display 1 to see if it would fix the issue).

image

Edition Windows 10 Pro Version 22H2 Installed on ‎7/‎7/‎2022 OS build 19045.4291 Experience Windows Feature Experience Pack 1000.19056.1000.0

WSL version: 2.1.5.0 Kernel version: 5.15.146.1-2 WSLg version: 1.0.60 MSRDC version: 1.2.5105 Direct3D version: 1.611.1-81528511 DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows version: 10.0.19045.4291 Linux host 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux Ubuntu 18.04 distro

It's as though the mouse is on one monitor, and the application is on the other. The only way I can get the mouse to interact with the application is when I alt-tab to the application, the initial mouse position from the other monitor seems to get passed in. I used xeyes to demonstrate this:

https://github.com/microsoft/wslg/assets/23504411/895f6a51-4132-4043-9fd7-81eb889af0ee

weston.log