]> Dogcows Code - chaz/openbox/commitdiff
fix non instrusive stacking adds, they didnt account for layers at all
authorDana Jansens <danakj@orodu.net>
Sun, 11 Mar 2007 14:16:24 +0000 (14:16 +0000)
committerDana Jansens <danakj@orodu.net>
Sun, 11 Mar 2007 14:16:24 +0000 (14:16 +0000)
openbox/stacking.c

index 29b3d1a9b064a65679668b90e4f46da6df201114..ff5a943be9a03a4f1c870e978d545cbf76a0dcb6 100644 (file)
@@ -385,6 +385,15 @@ void stacking_add_nonintrusive(ObWindow *win)
         /* out of ideas, just add it normally... */
         stacking_add(win);
     } else {
+        GList *it;
+
+        /* make sure it's not in the wrong layer though ! */
+        while (it_before && client->layer < ((ObClient*)it_before->data)->layer)
+            it_before = g_list_next(it_before);
+        while (it_before != stacking_list &&
+               client->layer > ((ObClient*)g_list_previous(it_before)->data)->layer)
+            it_before = g_list_previous(it_before);
+
         GList *wins = g_list_append(NULL, win);
         do_restack(wins, it_before);
         g_list_free(wins);
This page took 0.027893 seconds and 4 git commands to generate.