#4487

Pointer doesn't get confined

Openbczhcopened 2mo ago

Discovered this issue accidentally when I was testing another wine bug. For some reason idk wine locks the pointer using the confine constraint.

Still taking my winit demo: https://github.com/bczhc/cursor-lock-demo/blob/28541053f31e27cd8a6144cb86d88f50aafd9465/src/bin/game-sim.rs#L143-L157. Press space to request the pointer lock but without hiding the pointer. Long demonstration video is below. You can see for unknown reason the app has a very low chance to get a confined pointer successfully. If the confinement succeeds, the wayland log prints a discarded xxxx .confined() line.

https://github.com/user-attachments/assets/b4a17465-bb3f-4021-89e6-09ab9f44eceb

Issue is not present on Hyprland, sway, cosmic-comp, kwin_wayland and mutter. Interestingly and notably, I should say, during my very massive tests about this, on some compositors, I did have noticed that the confine request fails but very occasionally (say, 1/30 probability).

mutter demonstration video:

https://github.com/user-attachments/assets/c3c9da6b-278c-4e59-8d88-9a0963f745fd

wine app launch & log filter: unset DISPLAY; WGPU_BACKEND=dx12 wldebug /usr/local/bin/wine game-sim.exe --no-hide-cursor | rg -v 'frame|relative_pointer|motion' --line-buffered | rg 'pointer'

System Information

  • niri version: dd75865f547f0eac0e9b6c4d86d2cd00c0744252 on main

Activity

0

No activity yet.