gardesk/ers / 52420a9

Browse files

promote all pending creates after debounce, drop event-gating

Authored by espadonne
SHA
52420a9d30e0aa68e77fdb250ea97648813e1ad9
Parents
f7ceef0
Tree
bd11755

1 changed file

StatusFile+-
M src/main.rs 6 7
src/main.rsmodified
@@ -262,16 +262,15 @@ fn main() {
262262
                 borders.remove(*wid);
263263
             }
264264
 
265
-            // Promote pending creates FIRST (so resizes below catch them)
265
+            // Promote ALL pending creates that weren't destroyed
266
+            // (the 150ms debounce is enough for tarmac to position them)
266267
             let ready: Vec<u32> = pending.iter()
267
-                .filter(|wid| (moved.contains(wid) || resized.contains(wid)) && !destroyed.contains(wid))
268
+                .filter(|wid| !destroyed.contains(wid))
268269
                 .copied()
269270
                 .collect();
270
-            for wid in ready {
271
-                pending.remove(&wid);
272
-                // Don't add yet — let the resize below handle it at final size
273
-                // Just ensure it's tracked so resize can recreate
274
-                borders.add_fresh(wid);
271
+            for wid in &ready {
272
+                pending.remove(wid);
273
+                borders.add_fresh(*wid);
275274
             }
276275
 
277276
             // Moves (reposition existing borders)