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

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
parent 4dff72fbf7
commit 9826d616dd

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;
}