mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 08:28:11 +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
|
@ -59,6 +59,12 @@ public:
|
|||
void popup(const Gfx::IntPoint& screen_position, const RefPtr<Action>& default_action = nullptr);
|
||||
void dismiss();
|
||||
|
||||
void visibility_did_change(Badge<WindowServerConnection>, bool visible);
|
||||
|
||||
Function<void(bool)> on_visibility_change;
|
||||
|
||||
bool is_visible() const { return m_visible; }
|
||||
|
||||
private:
|
||||
friend class MenuBar;
|
||||
|
||||
|
@ -71,6 +77,7 @@ private:
|
|||
RefPtr<Gfx::Bitmap> m_icon;
|
||||
NonnullOwnPtrVector<MenuItem> m_items;
|
||||
WeakPtr<Action> m_last_default_action;
|
||||
bool m_visible { false };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue