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:
parent
0315741815
commit
9b740f218b
8 changed files with 49 additions and 9 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue