core when the list gets out of order
authorDana Jansens <danakj@orodu.net>
Fri, 27 Jun 2003 04:23:05 +0000 (04:23 +0000)
committerDana Jansens <danakj@orodu.net>
Fri, 27 Jun 2003 04:23:05 +0000 (04:23 +0000)
openbox/stacking.c

index 220399d..731349d 100644 (file)
@@ -69,6 +69,13 @@ static void do_restack(GList *wins, GList *before)
         stacking_list = g_list_insert_before(stacking_list, before, it->data);
     }
 
+    /* XXX some debug checking of the stacking list's order */
+    for (it = stacking_list; ; it = next) {
+        next = g_list_next(it);
+        if (!next) break;
+        g_assert(window_layer(it->data) >= window_layer(next->data));
+    }
+
     XRestackWindows(ob_display, win, i);
     g_free(win);
 }