]> Dogcows Code - chaz/openbox/commitdiff
assert that add_new is not making a duplicate entry
authorDana Jansens <danakj@orodu.net>
Sat, 18 Oct 2003 22:11:18 +0000 (22:11 +0000)
committerDana Jansens <danakj@orodu.net>
Sat, 18 Oct 2003 22:11:18 +0000 (22:11 +0000)
openbox/focus.c

index 3b4dd14537c6b641194ba73376b7355bc5066729..674a24713ddfb930753c07fa64ecd62979475bc9 100644 (file)
@@ -661,12 +661,14 @@ void focus_order_add_new(ObClient *c)
         d = c->desktop;
         if (d == DESKTOP_ALL) {
             for (i = 0; i < screen_num_desktops; ++i) {
+                g_assert(!g_list_find(focus_order[i], c));
                 if (focus_order[i] && ((ObClient*)focus_order[i]->data)->iconic)
                     focus_order[i] = g_list_insert(focus_order[i], c, 0);
                 else
                     focus_order[i] = g_list_insert(focus_order[i], c, 1);
             }
         } else {
+            g_assert(!g_list_find(focus_order[d], c));
             if (focus_order[d] && ((ObClient*)focus_order[d]->data)->iconic)
                 focus_order[d] = g_list_insert(focus_order[d], c, 0);
             else
This page took 0.022857 seconds and 4 git commands to generate.