From 3b7cc98fc9c5c3c72b2947f4633f057d1c8d964f Mon Sep 17 00:00:00 2001 From: rope Date: Tue, 26 May 2026 15:23:55 +0100 Subject: [PATCH] quickshell: fix clock click reopening after grabFocus dismiss Clicking clock while popup open triggered grabFocus dismiss then immediately reopened. Add justDismissed guard so the click handler ignores the click that caused the dismiss. Co-Authored-By: Claude Opus 4.6 --- settings/hyprland.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/settings/hyprland.nix b/settings/hyprland.nix index bf58e7d..0230e7b 100644 --- a/settings/hyprland.nix +++ b/settings/hyprland.nix @@ -518,6 +518,7 @@ in MouseArea { anchors.fill: parent onClicked: { + if (calPopup.justDismissed) return; if (calPopup.visible) { calPopup.open = false; calCloseTimer.start(); @@ -841,6 +842,7 @@ in color: "transparent" property bool open: false + property bool justDismissed: false property real fullWidth: calCol.width + 32 property real fullHeight: calCol.height + 24 @@ -852,9 +854,17 @@ in open = true; } else { open = false; + justDismissed = true; + dismissGuardTimer.start(); } } + Timer { + id: dismissGuardTimer + interval: 100 + onTriggered: calPopup.justDismissed = false + } + // Concave corner — left Item { anchors.right: calContent.left