fix interaction between Move action and click bindings

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.
This commit is contained in:
bi4k8 2021-12-02 14:07:17 +00:00 committed by Johan Malm
parent d8bbb751d2
commit a94fb3b225

View file

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