From 522897d5afcb60e16eea5fd571eaf260f2f1de5e Mon Sep 17 00:00:00 2001 From: Simon Long Date: Fri, 26 Apr 2024 15:36:02 +0100 Subject: [PATCH] Prevent key release bindings running when session locked --- src/input/keyboard.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/input/keyboard.c b/src/input/keyboard.c index f7b70e74..e43d2655 100644 --- a/src/input/keyboard.c +++ b/src/input/keyboard.c @@ -410,6 +410,11 @@ handle_compositor_keybindings(struct keyboard *keyboard, if (event->state == WL_KEYBOARD_KEY_STATE_RELEASED) { if (cur_keybind && cur_keybind->mod_only) { + if (seat->active_client_while_inhibited + || seat->server->session_lock) { + cur_keybind = NULL; + return false; + } key_state_store_pressed_key_as_bound(event->keycode); actions_run(NULL, server, &cur_keybind->actions, 0); cur_keybind = NULL;