Use existing reset_keybind function

This commit is contained in:
Simon Long 2024-06-14 10:23:04 +01:00 committed by Johan Malm
parent e6c239e783
commit 2573162a4f
3 changed files with 3 additions and 4 deletions

View 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);

View 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;

View 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