mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:48:11 +00:00
LibGUI: Flesh out focus implementation and more GTextBox work.
This commit is contained in:
parent
d72575d196
commit
de2423de5f
10 changed files with 54 additions and 27 deletions
|
@ -139,8 +139,13 @@ void GWindow::set_focused_widget(GWidget* widget)
|
|||
{
|
||||
if (m_focused_widget == widget)
|
||||
return;
|
||||
if (m_focused_widget)
|
||||
if (m_focused_widget) {
|
||||
GEventLoop::main().post_event(m_focused_widget, make<GEvent>(GEvent::FocusOut));
|
||||
m_focused_widget->update();
|
||||
}
|
||||
m_focused_widget = widget;
|
||||
m_focused_widget->update();
|
||||
if (m_focused_widget) {
|
||||
GEventLoop::main().post_event(m_focused_widget, make<GEvent>(GEvent::FocusIn));
|
||||
m_focused_widget->update();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue