LibGUI: Update windows when they become active/inactive

Since interfaces may look different depending on the window active state
we need to update them when it changes.
This commit is contained in:
Andreas Kling 2021-07-28 20:22:42 +02:00
commit 9826d616dd
Notes: sideshowbarker 2024-07-18 07:59:15 +09:00

View file

@ -227,12 +227,14 @@ void Application::tooltip_hide_timer_did_fire()
void Application::window_did_become_active(Badge<Window>, Window& window)
{
m_active_window = window.make_weak_ptr<Window>();
window.update();
}
void Application::window_did_become_inactive(Badge<Window>, Window& window)
{
if (m_active_window.ptr() != &window)
return;
window.update();
m_active_window = nullptr;
}