mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:47:34 +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:
parent
4dff72fbf7
commit
9826d616dd
1 changed files with 2 additions and 0 deletions
|
@ -227,12 +227,14 @@ void Application::tooltip_hide_timer_did_fire()
|
||||||
void Application::window_did_become_active(Badge<Window>, Window& window)
|
void Application::window_did_become_active(Badge<Window>, Window& window)
|
||||||
{
|
{
|
||||||
m_active_window = window.make_weak_ptr<Window>();
|
m_active_window = window.make_weak_ptr<Window>();
|
||||||
|
window.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::window_did_become_inactive(Badge<Window>, Window& window)
|
void Application::window_did_become_inactive(Badge<Window>, Window& window)
|
||||||
{
|
{
|
||||||
if (m_active_window.ptr() != &window)
|
if (m_active_window.ptr() != &window)
|
||||||
return;
|
return;
|
||||||
|
window.update();
|
||||||
m_active_window = nullptr;
|
m_active_window = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue