]> git.mdlowis.com Git - proto/labwc.git/commitdiff
src/keyboard.c: Fix wrong argument parsing
authorConsolatis <35009135+Consolatis@users.noreply.github.com>
Tue, 7 Mar 2023 16:58:15 +0000 (17:58 +0100)
committerJohan Malm <johanmalm@users.noreply.github.com>
Tue, 7 Mar 2023 20:55:35 +0000 (20:55 +0000)
The `wlr_keyboard.events.modifiers` signal does not use
a `wlr_keyboard_key_event` as argument, instead it is a
pointer to the `wlr_keyboard` instance which caused the
signal.

src/keyboard.c

index 5cfbaa05c49a10d77bb4b034f288be3b7e9e494e..d4d7ff75dba62d6f536cc5cfa3d1e6998ebd8510 100644 (file)
@@ -53,7 +53,6 @@ keyboard_modifiers_notify(struct wl_listener *listener, void *data)
        struct keyboard *keyboard = wl_container_of(listener, keyboard, modifier);
        struct seat *seat = keyboard->base.seat;
        struct server *server = seat->server;
-       struct wlr_keyboard_key_event *event = data;
        struct wlr_keyboard *wlr_keyboard = keyboard->wlr_keyboard;
 
        if (server->input_mode == LAB_INPUT_STATE_MOVE) {
@@ -63,8 +62,7 @@ keyboard_modifiers_notify(struct wl_listener *listener, void *data)
 
        if (server->osd_state.cycle_view || server->grabbed_view
                        || seat->workspace_osd_shown_by_modifier) {
-               if (event->state == WL_KEYBOARD_KEY_STATE_RELEASED
-                               && !keyboard_any_modifiers_pressed(wlr_keyboard))  {
+               if (!keyboard_any_modifiers_pressed(wlr_keyboard))  {
                        if (server->osd_state.cycle_view) {
                                if (key_state_nr_keys()) {
                                        should_cancel_cycling_on_next_key_release = true;