https://bugs.winehq.org/show_bug.cgi?id=50394
Bug ID: 50394 Summary: World of Warcraft: Hardware Cursor Quirks under XWayland Product: Wine Version: 5.21 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: jaapbuurman@gmail.com Distribution: ---
World of Warcraft's hardware cursor mouse is not working correctly compared to X11 or Windows under XWayland. By default, a software cursor is used (with its own issues that happen under Windows as well), but one can change to a hardware cursor by issuing the following command in the chat window: /console rawMouseEnable 1
Once the hardware cursor is enabled, to reproduce the bug do the following:
1) Press and hold the left mouse button, this will hide the cursor and will now allow you to rotate the camera by moving the mouse. 2) Move the mouse all the way to the left to rotate the camera to the left. This will work fine until the hidden cursor reaches the end of the monitor to the left. Under X11 and Windows, you can keep rotating left for as long as you want. Optional 3) If you have multiple monitors, move the cursor all the way to the right to rotate the camera right. Your mouse will end up on the right monitor.
A workaround is to enable wine's "Automatically capture the mouse in full-screen windows" option, but that obviously breaks your ability to seamlessly multitask between WoW on one monitor, and a browser on another for example. Under X11 that option is not required, and the mouse behaves well when pressed down without that workaround, allowing you to easily multitask when not holding the mouse button down.
At first I reported said issue upstream at XWayland's tracker, where they could also reproduce the issue. Unfortunately, it seems it's WoW doing something stupid, which they cannot work around without breaking other applications and they also cannot implement application specific workarounds. Therefor, I am now reporting said issue here.
I quote:
"I added SET rawMouseEnable "1" in Config.wtf and can indeed reproduce then. Checked what the game does and it's kinda terrible for us...On Windows and X11 the pointer does in fact leave the window, the cursor is just hidden meanwhile. On button release, the application tries to warp the pointer back into the application window, back to the button press coordinates.
This throws off the pointer warping heuristics in Xwayland. The cursor being hidden would usually trigger the pointer lock if there was a confinement in addition, but there's none. And anyway pointer locks are only meant to work under the surface coordinates, they cannot be used to belatedly bring the pointer back to the surface. Wine's "Automatically capture mouse" option enforces a pointer confinement, so brings things back to working.
Maybe @ofourdan can think of something here, I certainly can't. The wayland-friendly solution is to preemptively lock the pointer, but changing that heuristic is likely going to break other apps. Being something that requires tinkering (at least on WoW), I'm hesitant to change much tbh..."
Reference: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1115
The game has a free trial, so reproducing it should be relatively easy. If you need any additional information, please do not hesitate to ask!