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
commit baac824ee3
Notes: sideshowbarker 2024-07-17 18:46:57 +09:00
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);