LibGUI: Disallow shortcut propagation in Blocking modals and Popups
This restriction is already present for mouse shortcuts but was forgotten in the recent key event refactor.
This commit is contained in:
parent
59e10d5283
commit
ef7d9c0166
Notes:
sideshowbarker
2024-07-17 04:18:14 +09:00
Author: https://github.com/thankyouverycool Commit: https://github.com/SerenityOS/serenity/commit/ef7d9c0166 Pull-request: https://github.com/SerenityOS/serenity/pull/16098
1 changed files with 3 additions and 0 deletions
|
@ -503,6 +503,9 @@ void Window::handle_key_event(KeyEvent& event)
|
||||||
if (event.is_accepted())
|
if (event.is_accepted())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (is_blocking() || is_popup())
|
||||||
|
return;
|
||||||
|
|
||||||
// Only process shortcuts if this is a keydown event.
|
// Only process shortcuts if this is a keydown event.
|
||||||
if (event.type() == Event::KeyDown)
|
if (event.type() == Event::KeyDown)
|
||||||
propagate_shortcuts_up_to_application(event, nullptr);
|
propagate_shortcuts_up_to_application(event, nullptr);
|
||||||
|
|
Loading…
Add table
Reference in a new issue