mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:47:34 +00:00
LibGUI: Improve automatic focus guessing somewhat
When opening a new window, we'll now try to find a suitable widget for initial focus by picking the first available mouse-focusable one. Whenever you press the tab key in a window with no focused widget, we'll attempt to find a keyboard-focusable widget and give it focus. This should make all applications keyboard-interactive immediately without having to manually place focus with the mouse.
This commit is contained in:
parent
28df2ede06
commit
ddad7575a9
2 changed files with 16 additions and 3 deletions
|
@ -204,6 +204,7 @@ private:
|
|||
virtual bool is_window() const override final { return true; }
|
||||
|
||||
void update_cursor();
|
||||
void focus_a_widget_if_possible(FocusSource);
|
||||
|
||||
void handle_drop_event(DropEvent&);
|
||||
void handle_mouse_event(MouseEvent&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue