Mouse cursor offset is misaligned in Wayland applications
Windows build number:
Microsoft Windows [Version 10.0.19043.2364]
Your Distribution version:
Ubuntu 22.10
Your WSL versions:
WSL version: 1.0.3.0 Kernel version: 5.15.79.1 WSLg version: 1.0.47 MSRDC version: 1.2.3575 Direct3D version: 1.606.4 DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows version: 10.0.19043.2364
Steps to reproduce:
Hello, I've recently started using WSLg on Windows 10 and have noticed a peculiar problem with all Wayland-enabled applications (epiphany, for instance). I don't know what the proper technical terms are, but, essentially, the visual position of the mouse cursor does not match the actual click point. The click is registered approximately 2-3 millimetres to the left of the cursor. X11 applications do not exhibit this problem, but are very blurry.
WSL logs:
No response
WSL dumps:
No response
Expected behavior:
I expect the cursor and click positions to match. For instance, in this example:

The caret should be placed in front of "v" rather than "a".
Actual behavior:
The cursor offset is off.
@v-chernyshev, thanks for reporting the issue. can you try weston-clickdot, which is one of Wayland demo applications, from weston package (sudo apt install weston, on Ubuntu), and do you see mouse is still offset? thanks!
@v-chernyshev, now I'm able to reproduce the issue you have been seeing, does your monitor have more than 100% scaling (HI-DPI) ? thanks!
Hi @hideyukn88, thank you for investigating the report! I indeed tried WSLg on a HI-DPI system. A 15" Lenovo ThinkPad X1 Extreme Gen 3 laptop to be precise, with 250% scaling.
Have you tried this .wslgconfig yet? I just installed epiphany and everything seems to line up with the mouse. How websites look, on the other hand... now that's an entirely different matter.
[system-distro-env]
WESTON_RDP_DISABLE_FRACTIONAL_HI_DPI_SCALING=false
WESTON_RDP_DEBUG_DESKTOP_SCALING_FACTOR=100
For me both of these variables needed to be setup for it to work, however.
Edit: Disclaimer: I'm running Debian 11 (bullseye)
This issue happens when there are multiple screen, using extend configure, if use the duplicate display configure, it works correctly. while if use extend conifgure, it will appear.
Confirmed on both jetbrains idea and cursor and windsurf.
Might related to https://github.com/microsoft/wslg/issues/1116 also
May also related to this also: https://github.com/microsoft/wslg/issues/1233
Hello, Has anyone found a solution or workaround for this? We would really like to stop using X410, but it’s not possible for us to work without multiple screens in Extend mode.
Same problem here. It is really annoying as it makes some applications unusable. A few times I've been lucky using the Win+Shift+Up shortcut to maximize the window and it gets fixed, but sometimes the application won't allow me to maximize so I'm stuck