quickshell: cancel pending hide when reviving a closing dropdown

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
rope 2026-06-11 20:01:20 +01:00
parent ab6f5d5dc8
commit 0878cba10d

View file

@ -508,8 +508,7 @@ in
} }
if (setupFn) setupFn(); if (setupFn) setupFn();
if (dd.closing) { if (dd.closing) {
dd.closing = false; dd.revive();
dd.open = true;
} else { } else {
dd.visible = true; dd.visible = true;
} }
@ -1015,6 +1014,16 @@ in
if (visible && !closing) _autoClose.restart(); 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))) x: Math.round(Math.min(bar.width - width, Math.max(0, dropdownX - width / 2)))
y: 30 y: 30
width: fullWidth + 16 width: fullWidth + 16