1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:38:10 +00:00

WindowServer+LibGUI: Notify clients when menus become visible/hidden

This will allow clients to react to these events.
This commit is contained in:
Andreas Kling 2021-04-05 14:32:34 +02:00
parent 0315741815
commit 9b740f218b
8 changed files with 49 additions and 9 deletions

View file

@ -162,4 +162,13 @@ Action* Menu::action_at(size_t index)
return m_items[index].action();
}
void Menu::visibility_did_change(Badge<WindowServerConnection>, bool visible)
{
if (m_visible == visible)
return;
m_visible = visible;
if (on_visibility_change)
on_visibility_change(visible);
}
}