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
commit 6c35aac617
Notes: sideshowbarker 2024-07-17 07:20:23 +09:00
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);