From 4bc6d69fc0fbfc3de5fb84874985a26deb79fdb5 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 13 Nov 2026 16:39:49 +0100 Subject: fix(windows): no peek for a dialog A transient dialog brought the Windows tab forward like any new window. Hyprland's clients JSON has no parent field, so a window counts as a dialog when it floats and its pid already has another window; peek() skips those. They are still listed in the grid. Co-Authored-By: Claude Opus 5.5 --- static/modules/windows.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'static/modules/windows.js') diff --git a/static/modules/windows.js b/static/modules/windows.js index d9f388e..0657a16 100644 --- a/static/modules/windows.js +++ b/static/modules/windows.js @@ -166,11 +166,11 @@ export default { }, // A window that was not there on the last poll brings the tab forward for - // [windows] peek seconds. + // [windows] peek seconds; a dialog of an app already open does not. peek(st) { if (!st.windows) return false; const ids = new Set(st.windows.map((w) => w.id)); - const fresh = this._ids != null && [...ids].some((id) => !this._ids.has(id)); + const fresh = this._ids != null && st.windows.some((w) => !w.dialog && !this._ids.has(w.id)); this._ids = ids; return fresh ? st.peek ?? 8 : 0; }, -- cgit v1.2.3