mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-29 12:49:08 +00:00
LibGUI: Focus the first focusable widget added to a window
It feels really awkward if nothing is focused when opening a window.
This commit is contained in:
@@ -115,6 +115,8 @@ void Widget::child_event(Core::ChildEvent& event)
|
||||
else
|
||||
layout()->add_widget(Core::to<Widget>(*event.child()));
|
||||
}
|
||||
if (window() && event.child() && Core::is<Widget>(*event.child()))
|
||||
window()->did_add_widget({}, Core::to<Widget>(*event.child()));
|
||||
}
|
||||
if (event.type() == Event::ChildRemoved) {
|
||||
if (layout()) {
|
||||
|
||||
Reference in New Issue
Block a user