From 4a6c506f37cee3f58d44871814b1391e639e7ac9 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Thu, 15 Aug 2024 12:37:54 +0200 Subject: [PATCH] nitpicker: deliver press events to global key receiver Fixes the following misbehavior: If a global key is pressed (e.g., Caps Lock in Sculpt) and the mouse is clicked before release, the global-keys handler receives the global-key press but no further events of the sequence, especially *no Caps-Lock release*. A more reasonable fix may address the "else branch" that deletes the _input_receiver in case of mouse events without a hovered client too, which is beyond the narrow scope of this fix. --- repos/os/src/server/nitpicker/user_state.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/os/src/server/nitpicker/user_state.cc b/repos/os/src/server/nitpicker/user_state.cc index a1c88adf99..c1a7617c0c 100644 --- a/repos/os/src/server/nitpicker/user_state.cc +++ b/repos/os/src/server/nitpicker/user_state.cc @@ -285,7 +285,7 @@ void User_state::_handle_input_event(Input::Event ev) if (!_input_receiver) return; - if (!_mouse_button(key) + if (!_mouse_button(key) || _global_key_sequence || (_hovered && (_hovered->has_focusable_domain() || _hovered->has_same_domain(_focused))))