mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-15 05:22:04 +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
Notes:
sideshowbarker
2024-07-19 14:07:48 +09:00
Author: https://github.com/rburchell
Commit: f55965b5e8
Pull-request: https://github.com/SerenityOS/serenity/pull/41
Reviewed-by: https://github.com/awesomekling ✅
9 changed files with 20 additions and 17 deletions
|
@ -39,7 +39,7 @@ void GMenu::add_separator()
|
|||
m_items.append(make<GMenuItem>(m_menu_id, GMenuItem::Separator));
|
||||
}
|
||||
|
||||
void GMenu::popup(const Point& screen_position, bool top_anchored)
|
||||
void GMenu::popup(const Point& screen_position)
|
||||
{
|
||||
if (!m_menu_id)
|
||||
realize_menu();
|
||||
|
@ -47,7 +47,6 @@ void GMenu::popup(const Point& screen_position, bool top_anchored)
|
|||
request.type = WSAPI_ClientMessage::Type::PopupMenu;
|
||||
request.menu.menu_id = m_menu_id;
|
||||
request.menu.position = screen_position;
|
||||
request.menu.top_anchored = top_anchored;
|
||||
GEventLoop::post_message_to_server(request);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue