diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-13 16:39:49 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-13 16:39:49 +0100 |
| commit | 4bc6d69fc0fbfc3de5fb84874985a26deb79fdb5 (patch) | |
| tree | e5209733fb7b1b8a5d31ad53e703b04273bb1c4c /static | |
| parent | 863f7453f9e136cadc93db9f3f0b8f257f798ce8 (diff) | |
| download | deck-it-4bc6d69fc0fbfc3de5fb84874985a26deb79fdb5.tar.gz deck-it-4bc6d69fc0fbfc3de5fb84874985a26deb79fdb5.zip | |
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 <noreply@anthropic.com>
Diffstat (limited to 'static')
| -rw-r--r-- | static/modules/windows.js | 4 |
1 files changed, 2 insertions, 2 deletions
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; }, |
