]> git.mdlowis.com Git - proto/labwc.git/commitdiff
Use existing reset_keybind function
authorSimon Long <simon@raspberrypi.com>
Fri, 14 Jun 2024 09:23:04 +0000 (10:23 +0100)
committerJohan Malm <johanmalm@users.noreply.github.com>
Sat, 15 Jun 2024 20:22:58 +0000 (21:22 +0100)
include/input/keyboard.h
src/action.c
src/input/keyboard.c

index 1f523da36acbc549a0cb1cfc1a087fcd86aab47e..ff2d8500bfc69c793388f7d65ef1e0feec2111f8 100644 (file)
@@ -9,8 +9,6 @@ struct seat;
 struct keyboard;
 struct wlr_keyboard;
 
-extern struct keybind *cur_keybind;
-
 void keyboard_reset_current_keybind(void);
 void keyboard_configure(struct seat *seat, struct wlr_keyboard *kb,
        bool is_virtual);
index 12523353b015171ee1c691c86fe561ca1c417063..152f04b486453d29843d0f29fead4eb55cebb710 100644 (file)
@@ -708,7 +708,8 @@ actions_run(struct view *activator, struct server *server,
                return;
        }
 
-       cur_keybind = NULL;
+       /* This cancels any pending on-release keybinds */
+       keyboard_reset_current_keybind ();
 
        struct view *view;
        struct action *action;
index d42650b3e8f2d204c796d1e5ce72eb4dcfaced63..147ec4dcbc0728df34b9b86c36fb94b510209238 100644 (file)
@@ -38,7 +38,7 @@ struct keyinfo {
 
 static bool should_cancel_cycling_on_next_key_release;
 
-struct keybind *cur_keybind;
+static struct keybind *cur_keybind;
 
 /* Called on --reconfigure to prevent segfault when handling release keybinds */
 void