]> git.mdlowis.com Git - proto/labwc.git/commit
cursor: allow movement until entering the constraint surface
authorJohn Lindgren <john@jlindgren.net>
Thu, 4 Dec 2025 08:02:03 +0000 (03:02 -0500)
committerJohn Lindgren <john@jlindgren.net>
Sat, 6 Dec 2025 16:04:41 +0000 (11:04 -0500)
commit61096463feff055e49b4613419dbe6f16d6b9d8f
tree308554766f8ae29e004cc16a639203567edde335
parent94d33f91197bc7e7061b8b775d6a71a78517d1ff
cursor: allow movement until entering the constraint surface

Fixes an issue where the cursor would get stuck (immovable) outside the
window of a Wine/Wayland game, if it was already outside when the game
started (common with a 4:3 game on a 16:9 screen). Now one can manually
move the cursor into the game window, at which point it becomes locked.

This is a minimal/interim fix. Ideally we should warp the cursor into
the constraint area automatically, but that would be a bit more work.

The change to apply_constraint() just turns an assert-failure into a
safe no-op return, since the function is now entered for "locked" as
well as "confined" constraint types.
src/input/cursor.c