From c7b20bf68329757738c70032f0269758294d5f59 Mon Sep 17 00:00:00 2001 From: lukefromdc Date: Sat, 6 Jan 2024 18:30:46 -0500 Subject: wayland: keep window list menu off space not used for buttons *Fix the window list menu replacing the panel context menu between the end of the window list and the next applet --- libmate-panel-applet/mate-panel-applet.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/libmate-panel-applet/mate-panel-applet.c b/libmate-panel-applet/mate-panel-applet.c index 543ba4c5..48e12622 100644 --- a/libmate-panel-applet/mate-panel-applet.c +++ b/libmate-panel-applet/mate-panel-applet.c @@ -1042,12 +1042,22 @@ mate_panel_applet_button_press (GtkWidget *widget, } } +#ifdef HAVE_WAYLAND + /*Limit the window list's applet menu to the handle area*/ + if (!(GDK_IS_X11_DISPLAY (gdk_display_get_default ()))) + { + MatePanelAppletFlags flags; + flags = mate_panel_applet_get_flags (applet); + if (flags & MATE_PANEL_APPLET_EXPAND_MAJOR) + return FALSE; + } +#endif + if (event->button == 3) { mate_panel_applet_menu_popup (applet, (GdkEvent *) event); return TRUE; } - return mate_panel_applet_button_event (applet, event); } -- cgit v1.2.1