aboutsummaryrefslogtreecommitdiffstats
path: root/static/modules/windows.js
diff options
context:
space:
mode:
Diffstat (limited to 'static/modules/windows.js')
-rw-r--r--static/modules/windows.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/static/modules/windows.js b/static/modules/windows.js
index 7e2a184..d9f388e 100644
--- a/static/modules/windows.js
+++ b/static/modules/windows.js
@@ -165,6 +165,16 @@ export default {
</div>`;
},
+ // A window that was not there on the last poll brings the tab forward for
+ // [windows] peek seconds.
+ 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));
+ this._ids = ids;
+ return fresh ? st.peek ?? 8 : 0;
+ },
+
update(st, el) {
// Polled every second: rebuilding unchanged rows reloads every icon
// through its fallbacks, which flickers, so only a change re-renders.