1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:37:43 +00:00

WindowServer: Add unadjusted position members to Menu

Used to determine Menu relationships by proxy
This commit is contained in:
thankyouverycool 2022-09-07 07:43:34 -04:00 committed by Linus Groh
parent 7c9ad6cc2f
commit 6c35aac617
3 changed files with 6 additions and 1 deletions

View file

@ -892,6 +892,7 @@ void WindowFrame::open_menubar_menu(Menu& menu)
auto menubar_rect = this->menubar_rect();
MenuManager::the().close_everyone();
auto position = menu.rect_in_window_menubar().bottom_left().translated(rect().location()).translated(menubar_rect.location());
menu.set_unadjusted_position(position);
auto& window = menu.ensure_menu_window(position);
auto window_rect = window.rect();
auto& screen = Screen::closest_to_rect(window_rect);