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