From db144ea05a98051662b4d77a2a0dfd950d670295 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sat, 24 Oct 2026 09:44:39 +0200 Subject: island: release the tray-menu hold when the menu closes A tray menu un-hovers the pills, so the island holds itself shown while one is open. display() reports no close, so the hold ended only when the pointer came back to the island. Quitting an app from its menu left the pointer on the vanished menu, below the pills, and the island stayed open until the next hover. Menus now open through a QsMenuAnchor. Its closed signal fires on any dismissal, an entry picked, Escape or a click elsewhere, and clears the hold and restarts the hide timer. Checked by eye: menu placement unchanged, Quit and a dismissal both retract the island, hovering back keeps it shown. Co-Authored-By: Claude Opus 5.5 --- desktop/island/Island.qml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'desktop/island/Island.qml') diff --git a/desktop/island/Island.qml b/desktop/island/Island.qml index 12f49ea..ee03ca1 100644 --- a/desktop/island/Island.qml +++ b/desktop/island/Island.qml @@ -52,10 +52,9 @@ PanelWindow { // A tray menu is a separate popup: moving onto it un-hovers the pills, // and the hide timer would then hide the island under the open menu. The - // menu cannot report its own close through display(), so the hold ends - // the next time the pointer comes back to the island. - // ponytail: if the menu is dismissed elsewhere, the island may stay shown - // until the next hover. + // hold ends when the menu closes, or the next time the pointer comes back. + // It used to wait for the pointer alone, which left the island stuck open + // after a menu's Quit, since the pointer was on the menu, not the pills. property bool menuHeld: false onHoveredChanged: { @@ -319,6 +318,10 @@ PanelWindow { window: win panel: win.panel onMenuShown: win.menuHeld = true + onMenuClosed: { + win.menuHeld = false; + if (!win.hovered && win.panel === "") hideTimer.restart(); + } onOpenSound: win.panel = win.panel === "sound" ? "" : "sound" onOpenHeadphones: win.panel = win.panel === "headphones" ? "" : "headphones" onClosePanel: win.panel = "" -- cgit v1.2.3