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
commit 7dadb75e28
Notes: sideshowbarker 2024-07-19 07:11:51 +09:00

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;
}