1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:27:35 +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

@ -635,7 +635,7 @@ void Menu::do_popup(Gfx::IntPoint const& position, bool make_input, bool as_subm
redraw_if_theme_changed();
constexpr auto margin = 10;
Gfx::IntPoint adjusted_pos = position;
Gfx::IntPoint adjusted_pos = m_unadjusted_position = position;
if (adjusted_pos.x() + window.width() > screen.rect().right() - margin) {
// Vertically translate the window by its full width, i.e. flip it at its vertical axis.