1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 07:17:35 +00:00

Redraw both incoming and outgoing widget when changing focus.

This commit is contained in:
Andreas Kling 2019-01-12 07:11:24 +01:00
parent 07873332e7
commit b7d83e3265
3 changed files with 6 additions and 1 deletions

View file

@ -128,10 +128,13 @@ void Window::setFocusedWidget(Widget* widget)
m_focusedWidget = nullptr;
else {
m_focusedWidget = widget->makeWeakPtr();
m_focusedWidget->update();
EventLoop::main().postEvent(m_focusedWidget.ptr(), make<Event>(Event::FocusIn));
}
if (previously_focused_widget)
if (previously_focused_widget) {
previously_focused_widget->update();
EventLoop::main().postEvent(previously_focused_widget, make<Event>(Event::FocusOut));
}
}
void Window::close()