]> git.mdlowis.com Git - proto/labwc.git/commitdiff
fix interaction between Move action and click bindings
authorbi4k8 <bi4k8@github>
Thu, 2 Dec 2021 14:07:17 +0000 (14:07 +0000)
committerJohan Malm <johanmalm@users.noreply.github.com>
Thu, 2 Dec 2021 17:58:31 +0000 (17:58 +0000)
in order to allow the Move action to be bound to "press" on mouse binding contexts that also have "click" bindings, we should not short-circuit event processing when the input_mode is not passthrough (the "normal" mode). doing so seems to have been intended to prevent mouse bindings from being triggered during move/resize/menu interactions, but this does not seem to occur in practice. instead, `cursor_button`'s early return in this case caused the "release" side of "click" bindings to be ignored if their "press" side began an action that changes input_mode (e.g. Move).

the cleaner way to fix this interaction would be to use "drag" rather than "press" for Move bindings, but implementing "drag" is more complexity than I want to include in this changeset.

this change is its own commit to make it easy to bisect for, in case it causes regressions.

src/cursor.c

index c572ec24e669d22282e0ed9c88e8c612d41c4a4f..e28aed37d8a4682796ef0ce3c4d7f0eb7363902b 100644 (file)
@@ -548,7 +548,6 @@ cursor_button(struct wl_listener *listener, void *data)
                        /* Exit interactive move/resize/menu mode. */
                        server->input_mode = LAB_INPUT_STATE_PASSTHROUGH;
                        cursor_rebase(&server->seat, event->time_msec);
-                       return;
                }
 
                /* Handle _release_ on root window */