]> git.lizzy.rs Git - bspwm.git/blobdiff - window.c
Don't schedule windows twice.
[bspwm.git] / window.c
index 509c99294504bb9850e99653c723e8890e498ca4..5814c7122d2a02ef4323af23d874a3bbe61c921f 100644 (file)
--- a/window.c
+++ b/window.c
@@ -48,6 +48,12 @@ void schedule_window(xcb_window_t win)
     if (override_redirect || locate_window(win, &loc))
         return;
 
+    /* Ignore pending windows */
+    for (pending_rule_t *pr = pending_rule_head; pr != NULL; pr = pr->next) {
+        if (pr->win == win)
+            return;
+    }
+
     rule_consequence_t *csq = make_rule_conquence();
     apply_rules(win, csq);
     if (!schedule_rules(win, csq)) {