You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This seems to work for X11, but under Wayland this doesn't properly capture the mouse pointer. In multi-display use, the mouse can leave the game window and causes all sorts of issues.
Camera control is lost
Clicking while cursor is off-window minimizes WT and sets focus to whatever was under the mouse pointer
I'm not too familiar with X11 and Wayland, but I suspect that using XGrabPointer and XUngrabPointer instead should fix the issue in Wayland, as Wayland has a compatibility layer to X11's API.
XGrabPointer has a confine_to parameter where the window the cursor should be confined to can be specified.
Unfortunately I don't think this would solve the issue. On both X11 and Wayland WT does not grab the cursor, The difference between X11 and Wayland is the cursor is not being warped back to the center of the window on Wayland, Where as it is on X11.
Also I don't think XGrabPointer works with XWayland anyway.
It does seem like there might be a way to fix this however, SDL and Blender had the same issue:
DagorEngine/prog/engine/drv/hid_mouse/linux_ms_api.cpp
Line 95 in 6221a23
This seems to work for X11, but under Wayland this doesn't properly capture the mouse pointer. In multi-display use, the mouse can leave the game window and causes all sorts of issues.
I'm not too familiar with X11 and Wayland, but I suspect that using
XGrabPointer
andXUngrabPointer
instead should fix the issue in Wayland, as Wayland has a compatibility layer to X11's API.XGrabPointer
has aconfine_to
parameter where the window the cursor should be confined to can be specified.DagorEngine/prog/engine/drv/hid_mouse/linux_ms_api.cpp
Line 98 in 6221a23
I suspect this should be implemented and call
XUngrabPointer
.The text was updated successfully, but these errors were encountered: