From 2573162a4f61511028a9c78fec3a6561fbcde497 Mon Sep 17 00:00:00 2001 From: Simon Long Date: Fri, 14 Jun 2024 10:23:04 +0100 Subject: [PATCH] Use existing reset_keybind function --- include/input/keyboard.h | 2 -- src/action.c | 3 ++- src/input/keyboard.c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/input/keyboard.h b/include/input/keyboard.h index 1f523da3..ff2d8500 100644 --- a/include/input/keyboard.h +++ b/include/input/keyboard.h @@ -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); diff --git a/src/action.c b/src/action.c index 12523353..152f04b4 100644 --- a/src/action.c +++ b/src/action.c @@ -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; diff --git a/src/input/keyboard.c b/src/input/keyboard.c index d42650b3..147ec4dc 100644 --- a/src/input/keyboard.c +++ b/src/input/keyboard.c @@ -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 -- 2.52.0