mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:27:35 +00:00
WindowServer: Make WSMenu use WSClientConnection::post_message().
This commit is contained in:
parent
8d5ba56cf9
commit
7723c06f27
4 changed files with 15 additions and 18 deletions
|
@ -10,15 +10,14 @@ class WSMenuBar;
|
|||
class WSMessage;
|
||||
class WSWindow;
|
||||
class Font;
|
||||
class Process;
|
||||
|
||||
class WSMenu : public Weakable<WSMenu> {
|
||||
public:
|
||||
WSMenu(Process&, int menu_id, String&& name);
|
||||
WSMenu(int client_id, int menu_id, String&& name);
|
||||
~WSMenu();
|
||||
|
||||
int client_id() const { return m_client_id; }
|
||||
int menu_id() const { return m_menu_id; }
|
||||
const Process* process() const { return m_process.ptr(); }
|
||||
|
||||
WSMenuBar* menu_bar() { return m_menubar; }
|
||||
const WSMenuBar* menu_bar() const { return m_menubar; }
|
||||
|
@ -75,7 +74,7 @@ public:
|
|||
|
||||
private:
|
||||
void did_activate(WSMenuItem&);
|
||||
|
||||
int m_client_id { 0 };
|
||||
int m_menu_id { 0 };
|
||||
String m_name;
|
||||
Rect m_rect_in_menubar;
|
||||
|
@ -84,6 +83,5 @@ private:
|
|||
WSMenuItem* m_hovered_item { nullptr };
|
||||
Vector<OwnPtr<WSMenuItem>> m_items;
|
||||
OwnPtr<WSWindow> m_menu_window;
|
||||
WeakPtr<Process> m_process;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue