From 0878cba10dda1b6be12d208e88810aff2444cba2 Mon Sep 17 00:00:00 2001 From: rope Date: Thu, 11 Jun 2026 20:01:20 +0100 Subject: [PATCH] quickshell: cancel pending hide when reviving a closing dropdown Co-Authored-By: Claude Fable 5 --- settings/quickshell.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/settings/quickshell.nix b/settings/quickshell.nix index 437778b..a4582c8 100644 --- a/settings/quickshell.nix +++ b/settings/quickshell.nix @@ -508,8 +508,7 @@ in } if (setupFn) setupFn(); if (dd.closing) { - dd.closing = false; - dd.open = true; + dd.revive(); } else { dd.visible = true; } @@ -1015,6 +1014,16 @@ in if (visible && !closing) _autoClose.restart(); } + // Reopen a dropdown that's mid-close: the pending hide + // timer must be cancelled, otherwise it fires later and + // closes the revived dropdown (and the whole chrome). + function revive() { + _closeDelay.stop(); + closing = false; + open = true; + _autoClose.restart(); + } + x: Math.round(Math.min(bar.width - width, Math.max(0, dropdownX - width / 2))) y: 30 width: fullWidth + 16