mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:57:45 +00:00
WindowServer+Taskbar: Let WindowServer manage the "window menus".
Taskbar now simply asks the WindowServer to popup a window menu when right clicking on a taskbar button. This patch also implements the "close" menu item, and furthermore makes the window menu show up when you left-click a window's titlebar icon. :^)
This commit is contained in:
parent
da475ce3f5
commit
2e9cc75d11
10 changed files with 92 additions and 35 deletions
|
@ -67,6 +67,7 @@ public:
|
|||
WMAPISetActiveWindowRequest,
|
||||
WMAPISetWindowMinimizedRequest,
|
||||
WMAPIStartWindowResizeRequest,
|
||||
WMAPIPopupWindowMenuRequest,
|
||||
APIPopupMenuRequest,
|
||||
APIDismissMenuRequest,
|
||||
__End_API_Client_Requests,
|
||||
|
@ -129,6 +130,26 @@ private:
|
|||
int m_target_window_id;
|
||||
};
|
||||
|
||||
class WSWMAPIPopupWindowMenuRequest : public WSAPIClientRequest {
|
||||
public:
|
||||
WSWMAPIPopupWindowMenuRequest(int client_id, int target_client_id, int target_window_id, const Point& position)
|
||||
: WSAPIClientRequest(WSEvent::WMAPIPopupWindowMenuRequest, client_id)
|
||||
, m_target_client_id(target_client_id)
|
||||
, m_target_window_id(target_window_id)
|
||||
, m_position(position)
|
||||
{
|
||||
}
|
||||
|
||||
int target_client_id() const { return m_target_client_id; }
|
||||
int target_window_id() const { return m_target_window_id; }
|
||||
Point position() const { return m_position; }
|
||||
|
||||
private:
|
||||
int m_target_client_id;
|
||||
int m_target_window_id;
|
||||
Point m_position;
|
||||
};
|
||||
|
||||
class WSWMAPISetActiveWindowRequest : public WSAPIClientRequest {
|
||||
public:
|
||||
WSWMAPISetActiveWindowRequest(int client_id, int target_client_id, int target_window_id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue