mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:27:44 +00:00
WindowServer: Make MenuBar unaware of Process.
This commit is contained in:
parent
7723c06f27
commit
2733a788eb
4 changed files with 7 additions and 11 deletions
|
@ -5,15 +5,13 @@
|
|||
#include <AK/Weakable.h>
|
||||
#include <AK/WeakPtr.h>
|
||||
|
||||
class Process;
|
||||
|
||||
class WSMenuBar : public Weakable<WSMenuBar> {
|
||||
public:
|
||||
WSMenuBar(int menubar_id, Process&);
|
||||
WSMenuBar(int client_id, int menubar_id);
|
||||
~WSMenuBar();
|
||||
|
||||
int client_id() const { return m_client_id; }
|
||||
int menubar_id() const { return m_menubar_id; }
|
||||
const Process* process() const { return m_process.ptr(); }
|
||||
void add_menu(WSMenu* menu) { m_menus.append(menu); }
|
||||
|
||||
template<typename Callback>
|
||||
|
@ -26,7 +24,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
int m_client_id { 0 };
|
||||
int m_menubar_id { 0 };
|
||||
WeakPtr<Process> m_process;
|
||||
Vector<WSMenu*> m_menus;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue