From 369d3558cd2dcd5da9cc7324a753757392cb531a Mon Sep 17 00:00:00 2001 From: George Dumitrescu Date: Tue, 4 Aug 2026 22:06:53 +0300 Subject: [PATCH] Give each menu button its own popover Both MenuButtons pointed at a single shared PopoverMenu instance. A GtkPopover can only have one parent, so GTK reparented it and logged gtk_widget_set_parent criticals on every launch. On Plasma the visible symptoms were a stray arrow pointing at the hidden header button, and the menu opening by itself. Each button now uses menu-model: and gets its own correctly parented popover from the same GMenu. The criticals go from one per launch to zero. --- src/window.blp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/window.blp b/src/window.blp index b6d4d1e..c3de2b6 100644 --- a/src/window.blp +++ b/src/window.blp @@ -27,7 +27,7 @@ Adw.ApplicationWindow window { Adw.HeaderBar header_bar { [start] MenuButton { - popover: menu_popover; + menu-model: menu_model; icon-name: "open-menu-symbolic"; tooltip-text: _("Main Menu"); valign: center; @@ -60,7 +60,7 @@ Adw.ApplicationWindow window { styles ["bar"] MenuButton button_menu_bottom { - popover: menu_popover; + menu-model: menu_model; icon-name: "open-menu-symbolic"; tooltip-text: _("Main Menu"); valign: center; @@ -82,11 +82,6 @@ Adw.ApplicationWindow window { }; } -PopoverMenu menu_popover { - menu-model: menu_model; - halign: start; -} - menu menu_model { item { label: _("Show App Names");