mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 02:57:42 +00:00
WindowServer: Let menu objects reference the WSClientConnection by pointer.
Since these are owner/ownee relationships, there's no need for indirection.
This commit is contained in:
parent
459cc23441
commit
fa452fadca
6 changed files with 19 additions and 16 deletions
|
@ -7,10 +7,11 @@
|
|||
|
||||
class WSMenuBar : public Weakable<WSMenuBar> {
|
||||
public:
|
||||
WSMenuBar(int client_id, int menubar_id);
|
||||
WSMenuBar(WSClientConnection& client, int menubar_id);
|
||||
~WSMenuBar();
|
||||
|
||||
int client_id() const { return m_client_id; }
|
||||
WSClientConnection& client() { return m_client; }
|
||||
const WSClientConnection& client() const { return m_client; }
|
||||
int menubar_id() const { return m_menubar_id; }
|
||||
void add_menu(WSMenu* menu) { m_menus.append(menu); }
|
||||
|
||||
|
@ -24,7 +25,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
int m_client_id { 0 };
|
||||
WSClientConnection& m_client;
|
||||
int m_menubar_id { 0 };
|
||||
Vector<WSMenu*> m_menus;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue