]> git.mdlowis.com Git - proto/labwc.git/commit
cursor.c: use subsurface as reference for out-of-surface movement
authorConsolatis <35009135+Consolatis@users.noreply.github.com>
Sat, 25 Jan 2025 20:45:54 +0000 (21:45 +0100)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Sun, 26 Jan 2025 13:22:06 +0000 (14:22 +0100)
commit37d745b01d372bcef995894db0cb7500f3c30c3d
tree61149540d11276b6886acc0487e4ffa415277fa6
parent26064fb8f6a52078d7cd38c39342636367deecdd
cursor.c: use subsurface as reference for out-of-surface movement

The protocol states that the wl_pointer motion coordinates must be
relative to the focused surface (e.g. the surface that last received
a wl_pointer enter event).

Before this patch, the coordinates were relative to the toplevel
surface instead, resulting in subsurface events having the wrong
coordinates when pressing a button over a subsurface and moving
the cursor outside of that subsurface.

Fixes: #2542
src/input/cursor.c