quickshell: stop discarding the tray menu on close
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 <noreply@anthropic.com>
This commit is contained in:
parent
105066c7c4
commit
196b71bf25
1 changed files with 8 additions and 3 deletions
|
|
@ -2110,9 +2110,14 @@ in
|
||||||
fullWidth: menuItems.width + 2 * Theme.panelGap
|
fullWidth: menuItems.width + 2 * Theme.panelGap
|
||||||
fullHeight: menuItems.height + 2 * Theme.panelGap
|
fullHeight: menuItems.height + 2 * Theme.panelGap
|
||||||
|
|
||||||
onVisibleChanged: {
|
// Deliberately NOT cleared on close. Nulling the menu threw
|
||||||
if (!visible) menuOpener.menu = null;
|
// 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 {
|
QsMenuOpener {
|
||||||
id: menuOpener
|
id: menuOpener
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue