From 196b71bf256c436f639b5779a7ba49111af82213 Mon Sep 17 00:00:00 2001 From: rope Date: Tue, 28 Jul 2026 14:58:54 +0100 Subject: [PATCH] quickshell: stop discarding the tray menu on close MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit contextMenu nulled menuOpener.menu whenever it hid, throwing away the loaded items. The only thing that refills them is the hover prefetch, which fires on enter — and the cursor is already on the icon you just clicked, so closing and reopening never re-triggered it. The reopen re-fetched over DBus and the panel grew to its empty height, then jumped when the items arrived. Moving to another widget and back worked only because it produced a fresh hover-enter. Keeping the handle assigned makes reopening the same item free, and since assigning an unchanged QML property is a no-op it also covers switching away and back. openFor() reassigns for a different item. Co-Authored-By: Claude Opus 5 --- settings/quickshell.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/settings/quickshell.nix b/settings/quickshell.nix index 107c2a3..5e80502 100644 --- a/settings/quickshell.nix +++ b/settings/quickshell.nix @@ -2110,9 +2110,14 @@ in fullWidth: menuItems.width + 2 * Theme.panelGap fullHeight: menuItems.height + 2 * Theme.panelGap - onVisibleChanged: { - if (!visible) menuOpener.menu = null; - } + // Deliberately NOT cleared on close. Nulling the menu threw + // away the loaded items, and the only thing that refills + // them is a hover-enter — which never fires if the cursor + // is still sitting on the icon you just clicked. Reopening + // then re-fetched over DBus and the panel grew to its empty + // height first, then jumped once the items landed. Keeping + // the handle assigned makes reopening the same item free; + // openFor() reassigns it when you pick a different one. QsMenuOpener { id: menuOpener