promote all pending creates after debounce, drop event-gating
- SHA
52420a9d30e0aa68e77fdb250ea97648813e1ad9- Parents
-
f7ceef0 - Tree
bd11755
52420a9
52420a9d30e0aa68e77fdb250ea97648813e1ad9f7ceef0
bd11755| Status | File | + | - |
|---|---|---|---|
| M |
src/main.rs
|
6 | 7 |
src/main.rsmodified@@ -262,16 +262,15 @@ fn main() { | ||
| 262 | 262 | borders.remove(*wid); |
| 263 | 263 | } |
| 264 | 264 | |
| 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) | |
| 266 | 267 | let ready: Vec<u32> = pending.iter() |
| 267 | - .filter(|wid| (moved.contains(wid) || resized.contains(wid)) && !destroyed.contains(wid)) | |
| 268 | + .filter(|wid| !destroyed.contains(wid)) | |
| 268 | 269 | .copied() |
| 269 | 270 | .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); | |
| 275 | 274 | } |
| 276 | 275 | |
| 277 | 276 | // Moves (reposition existing borders) |