]> git.mdlowis.com Git - proto/labwc.git/commit
src/cursor: ensure interactive move/resize ends correctly for CSD clients
authorConsolatis <35009135+Consolatis@users.noreply.github.com>
Mon, 28 Aug 2023 14:43:51 +0000 (16:43 +0200)
committerJohan Malm <johanmalm@users.noreply.github.com>
Sun, 10 Sep 2023 15:49:54 +0000 (16:49 +0100)
commit97ac960feebc552437fc2b536874671163b747ce
treeac45ab8a7f3af5bba6deba8f9dad5e160b799c79
parentbb235337d8ee746c5237b1c26e2fdb993b560bd7
src/cursor: ensure interactive move/resize ends correctly for CSD clients

Before this patch, when moving a CSD client below a layershell surface -
like a panel that was configured with either the "top" or "overlay"
layers - we'd only send a matching release button event to the client but
not actually end the interactive move operation. That caused the drag to
continue even though the user already released the mouse button.

In comparison, SSD clients were not suffering from the same issue because
the initial mouse "down" event was not attached to any client surface and
thus it would not take the first early return because there was no surface
attached to the release event.

This patch fixes the issue by reordering the conditions where we return
early. It also ensures that when we finish the move, we still send the
release event to CSD clients.

Fixes: #1053
Reported-by: @DynamoFox (thanks)
src/cursor.c