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:
parent
0b14ef134d
commit
baac824ee3
4 changed files with 12 additions and 7 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue