mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:47:45 +00:00
WindowServer: Clean up any menu objects on process exit.
..and now that this works, implement the Quit menu action in Terminal. :^)
This commit is contained in:
parent
f311d0f353
commit
4b8133e925
10 changed files with 76 additions and 16 deletions
|
@ -8,9 +8,11 @@ class Process;
|
|||
|
||||
class WSMenuBar {
|
||||
public:
|
||||
explicit WSMenuBar(Process&);
|
||||
WSMenuBar(int menubar_id, Process&);
|
||||
~WSMenuBar();
|
||||
|
||||
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>
|
||||
|
@ -23,6 +25,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
int m_menubar_id { 0 };
|
||||
WeakPtr<Process> m_process;
|
||||
Vector<WSMenu*> m_menus;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue