mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:47:34 +00:00
WindowServer/GMenu: Adjust the popup position to fit the window inside the screen
Rather than passing a "top_anchored" bool. Fixes #22.
This commit is contained in:
parent
a4b0dfff43
commit
f55965b5e8
9 changed files with 20 additions and 17 deletions
|
@ -235,22 +235,19 @@ private:
|
|||
|
||||
class WSAPIPopupMenuRequest : public WSAPIClientRequest {
|
||||
public:
|
||||
WSAPIPopupMenuRequest(int client_id, int menu_id, const Point& position, bool top_anchored)
|
||||
WSAPIPopupMenuRequest(int client_id, int menu_id, const Point& position)
|
||||
: WSAPIClientRequest(WSEvent::APIPopupMenuRequest, client_id)
|
||||
, m_menu_id(menu_id)
|
||||
, m_position(position)
|
||||
, m_top_anchored(top_anchored)
|
||||
{
|
||||
}
|
||||
|
||||
int menu_id() const { return m_menu_id; }
|
||||
Point position() const { return m_position; }
|
||||
bool top_anchored() const { return m_top_anchored; }
|
||||
|
||||
private:
|
||||
int m_menu_id;
|
||||
Point m_position;
|
||||
bool m_top_anchored;
|
||||
};
|
||||
|
||||
class WSAPIDismissMenuRequest : public WSAPIClientRequest {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue