1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:57:44 +00:00

WindowServer: Pop up the window menu at bottom left of window icon

When clicking the window icon, we now pop up the window menu at the
bottom left of the icon, no matter where you clicked it.

Right-clicking the title bar still pops up at the event position.
This commit is contained in:
Andreas Kling 2020-04-29 12:06:11 +02:00
parent f0cde70c18
commit 7dadb75e28

View file

@ -358,7 +358,7 @@ void WindowFrame::on_mouse_event(const MouseEvent& event)
if (m_window.type() == WindowType::Normal && event.type() == Event::MouseDown && (event.button() == MouseButton::Left || event.button() == MouseButton::Right) && title_bar_icon_rect().contains(event.position())) {
wm.move_to_front_and_make_active(m_window);
m_window.popup_window_menu(event.position().translated(rect().location()));
m_window.popup_window_menu(title_bar_icon_rect().bottom_left().translated(rect().location()));
return;
}