1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:37:35 +00:00

LibGUI: CommandPalette: Fix key event capture for actions

This patch fixes an issue for applications that contain actions without
a modifier (e.g. PixelPaint). Previously when pressing any key bound to
an action while the CommandPalette was visible the action was forwarded
to the parent instead of the CommandPalette.
This commit is contained in:
faxe1008 2022-09-05 21:17:45 +02:00 committed by Andreas Kling
parent 5ff63a9eb0
commit d91469ebb1
3 changed files with 5 additions and 4 deletions

View file

@ -223,8 +223,8 @@ CommandPalette::CommandPalette(GUI::Window& parent_window, ScreenPosition screen
m_text_box->set_focus(true);
on_active_window_change = [this](bool is_active_window) {
if (!is_active_window)
on_active_input_change = [this](bool is_active_input) {
if (!is_active_input)
close();
};