wayfire icon indicating copy to clipboard operation
wayfire copied to clipboard

XWayland mouse positioning incorrect on multi-monitor setups

Open 0x0015 opened this issue 1 year ago • 2 comments

Describe the bug When running multiple monitors (left monitor 1080p, right monitor 4k) some games (XWayland through both proton and native) are unable to track the mouse position if it goes far enough to the right.

To Reproduce Steps to reproduce the behavior:

  1. Launch a game on a multiple monitor setup (Core Keeper (proton) in this case, but that should be non-specific as I've seen this is other unity, and non-unity games (terraria (native) and trackmania (proton) to name a few, but it's also often inconsistent (eg. I've seen it in terraria, but only every once in a while). Core Keeper seems to just be a case where it is consistant).
  2. Select the 4k monitor (as I want the window to spawn there)
  3. Mouse issues

Expected behavior The mouse cursor should be in the correct position.

Screenshots or stacktrace

https://github.com/WayfireWM/wayfire/assets/64482595/9b116bcf-918b-401a-932f-a3a9e905430f

(core keeper native works as intended, so it's in some ways a bad example)

https://github.com/WayfireWM/wayfire/assets/64482595/ce98445e-c96c-4c2a-8f79-bf8d6d9758cd

(trackmania, a little harder to see, but also manifests slightly differently, with the cursor position just being wrong rather than having an inaccessible area)

Output section of wayfire.ini
[output:DP-1]
mode = 3840x2160@60000
position = 3200, 0
scale = 1.00000
transform = normal
[output:DP-2]
mode = 1920x1080@75000
position = 1280, 0
scale = 1.000000
transform = normal
While I no longer have my 3rd monitor, there was another monitor taking up the space between 0 and 1280.

Wayfire version 0.8.0-3 from chaotic-aur (https://builds.garudalinux.org/repos/chaotic-aur/x86_64/wayfire-0.8.0-3-x86_64.pkg.tar.zst, should be same as https://aur.archlinux.org/packages/wayfire) along with plugins-extra 0.8.0-1 (same source).

Edit: I just realized I should have added this in the first place, so I just tested both core keeper and trackmania on plasma wayland and they worked normal.

0x0015 avatar Nov 04 '23 03:11 0x0015

Does it work if you translate your outputs to the left in the config file (so that they start at 0,0 not at 1280,0)?

ammen99 avatar Nov 04 '23 07:11 ammen99

Hello,

Translating so that the config file starts at 0,0 (and 1920, 0) fixed the Core Keeper issue (makes sense because it was a newer problem than the other, making me think it's probably similar to #1421), but the Trackmania one persisted.

Sorry for the potential duplicate on that one.

0x0015 avatar Nov 04 '23 20:11 0x0015

Soo I could reproduce this issue but then I could fix it easily by setting the wine settings as explained here: https://github.com/WayfireWM/wayfire/wiki/Tips-&-Tricks#wine

This is a strong indication that the bug is in Wine somewhere. Is there someone else who experiences this issue even when using these settings?

ammen99 avatar Mar 10 '24 08:03 ammen99

@soreau also reported that mouse input works after setting the wine settings appropriately (if anyone has this problem, pay special attention to the hint at the end of the wiki, you have to set the wine/proton settings for the particular game, as each game has its own wine version and configuration).

ammen99 avatar Mar 10 '24 16:03 ammen99