From 33a48f1387f247742d93974faf6c308651f95e36 Mon Sep 17 00:00:00 2001 From: Riteo Siuga Date: Sat, 3 Jan 2026 21:48:18 +0100 Subject: [PATCH] Wayland: Track popup menu mouse mask properly We were updating `last_mouse_monitor_mask` only if there were popup menus open, which is obviously wrong. --- platform/linuxbsd/wayland/display_server_wayland.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/platform/linuxbsd/wayland/display_server_wayland.cpp b/platform/linuxbsd/wayland/display_server_wayland.cpp index 0c0fbe59df..6cdf0dd9b0 100644 --- a/platform/linuxbsd/wayland/display_server_wayland.cpp +++ b/platform/linuxbsd/wayland/display_server_wayland.cpp @@ -1766,11 +1766,10 @@ void DisplayServerWayland::process_events() { Ref mb = inputev_msg->event; bool handled = false; - if (!popup_menu_list.is_empty() && mb.is_valid()) { - // Popup menu handling. - + if (mb.is_valid()) { BitField mouse_mask = mb->get_button_mask(); - if (mouse_mask != last_mouse_monitor_mask && mb->is_pressed()) { + if (!popup_menu_list.is_empty() && mb->is_pressed() && mouse_mask != last_mouse_monitor_mask) { + // Popup menu handling. List::Element *E = popup_menu_list.back(); List::Element *C = nullptr;