From 96566d0319a2170a00f9c8b89308e0cd42bced2d Mon Sep 17 00:00:00 2001 From: rope Date: Tue, 26 May 2026 15:15:40 +0100 Subject: [PATCH] quickshell: remove grabFocus, animate close on clock click Wayland popup protocol prevents re-showing dismissed popups. Remove grabFocus and toggle open/close via clock click only, allowing the slide-up animation to play on close. Co-Authored-By: Claude Opus 4.6 --- settings/hyprland.nix | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/settings/hyprland.nix b/settings/hyprland.nix index 10a71dc..3a5d0ac 100644 --- a/settings/hyprland.nix +++ b/settings/hyprland.nix @@ -518,11 +518,10 @@ in MouseArea { anchors.fill: parent onClicked: { - if (calPopup.visible && !calPopup.closing) { - calPopup.closing = true; + if (calPopup.visible) { calPopup.open = false; calCloseTimer.start(); - } else if (!calPopup.visible) { + } else { calPopup.visible = true; } } @@ -531,7 +530,7 @@ in Timer { id: calCloseTimer interval: 230 - onTriggered: { calPopup.closing = false; calPopup.visible = false; } + onTriggered: calPopup.visible = false } } @@ -837,12 +836,10 @@ in anchor.edges: Edges.Top | Edges.Left anchor.gravity: Edges.Bottom | Edges.Right anchor.adjustment: PopupAdjustment.Slide - grabFocus: true visible: false color: "transparent" property bool open: false - property bool closing: false property real fullWidth: calCol.width + 32 property real fullHeight: calCol.height + 24 @@ -851,13 +848,7 @@ in onVisibleChanged: { if (visible) { - if (!closing) open = true; - } else if (open && !closing) { - // grabFocus hid us — re-show and animate closed - closing = true; - visible = true; - open = false; - calCloseTimer.start(); + open = true; } }