In Yamagi Quake II we got a bugreport about mouse grabbing failing with fullscreen windows.
It turned out that the reporter configured their XFCE to switch the workspace if the mouse cursor reaches the display border (Settings => Window Manager => Advanced => Wrap workspace when reaching the screen edge => [x] With the mouse pointer).
I personally find this feature completely annoying, but whatever, it’s there and apparently people are using it…
The problem is that XFCE switches the workspace even if SDL grabs the cursor (
SDL_SetWindowGrab(), which calls
XGrabPointer() under the hood) - YQ2 calls both
SDL_SetWindowGrab(window, SDL_TRUE) and
I think it’s completely broken on XFCE’s side to do this even though a window is grabbing the cursor, but I still wonder if SDL could/should work around this?
Especially when using relative mouse mode (where I think by default the X cursor events are ignored and raw mouse events are used) it might be possible to confine the cursor in a small section in the middle of the window, possibly with XFixesCreatePointerBarrier()?
The YQ2 bugreport mentions the same problem with KDE on Wayland, but I haven’t looked further into that - maybe the underlying problem is similar, maybe it’s a bug in SDL’s Wayland code, no idea, I have no experience with Wayland.
UPDATE: I reported the bug at XFCE, I’m curious if they’ll fix it: https://gitlab.xfce.org/xfce/xfwm4/-/issues/427