|
@@ -195,9 +195,12 @@ void WindowServerConnection::key_down(i32 window_id, u32 code_point, u32 key, u3
|
|
|
key_event->m_code_point = emoji_code_point;
|
|
|
}
|
|
|
|
|
|
+ bool accepts_command_palette = true;
|
|
|
+ if (window->focused_widget())
|
|
|
+ accepts_command_palette = window->focused_widget()->accepts_command_palette();
|
|
|
+
|
|
|
// FIXME: This shortcut should be configurable.
|
|
|
- bool focused_widget_accepts_command_palette = window->focused_widget() && window->focused_widget()->accepts_command_palette();
|
|
|
- if (focused_widget_accepts_command_palette && !m_in_command_palette && modifiers == (Mod_Ctrl | Mod_Shift) && key == Key_A) {
|
|
|
+ if (accepts_command_palette && !m_in_command_palette && modifiers == (Mod_Ctrl | Mod_Shift) && key == Key_A) {
|
|
|
auto command_palette = CommandPalette::construct(*window);
|
|
|
TemporaryChange change { m_in_command_palette, true };
|
|
|
if (command_palette->exec() != GUI::Dialog::ExecOK)
|