1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:37:34 +00:00

LibGUI: Make propagate_shortcuts handle different level of propagation

First, this patch renames the function
`propagate_shortcuts_up_to_application` to `propagate_shortcuts`.
Handling those levels, will allow us to differentiate shortcuts at
`Window` level and `Application` level. Which will be convenient to
handle dialog-specific shortcuts.
This commit is contained in:
Lucas CHOLLET 2023-03-08 18:31:53 -05:00 committed by Jelle Raaijmakers
parent 0b14ef134d
commit baac824ee3
4 changed files with 12 additions and 7 deletions

View file

@ -229,7 +229,12 @@ public:
void set_always_on_top(bool always_on_top = true);
void propagate_shortcuts_up_to_application(KeyEvent& event, Widget* widget);
enum class ShortcutPropagationBoundary {
Window,
Application,
};
void propagate_shortcuts(KeyEvent& event, Widget* widget, ShortcutPropagationBoundary = ShortcutPropagationBoundary::Application);
protected:
Window(Core::Object* parent = nullptr);