]> Dogcows Code - chaz/openbox/blobdiff - openbox/stacking.c
fix compile without startup notification after r5711
[chaz/openbox] / openbox / stacking.c
index e77e199fb41a4b2559fd66805ed4874730f6ba6c..cb8eaf31a996fd72c29dce49d01dd275be80d908 100644 (file)
@@ -197,7 +197,9 @@ static void restack_windows(ObClient *selected, gboolean raise)
     stacking_list = g_list_delete_link(stacking_list, it);
 
     /* go from the bottom of the stacking list up */
-    for (it = g_list_last(stacking_list); it; it = g_list_previous(it)) {
+    for (it = g_list_last(stacking_list); it; it = next) {
+        next = g_list_previous(it);
+
         if (WINDOW_IS_CLIENT(it->data)) {
             ObClient *ch = it->data;
 
@@ -242,8 +244,10 @@ static void restack_windows(ObClient *selected, gboolean raise)
     last = NULL;
     for (it = g_list_last(stacking_list); it; it = g_list_previous(it))
     {
-        if (window_layer(it->data) < selected->layer)
+        if (window_layer(it->data) < selected->layer) {
+            last = it;
             continue;
+        }
         /* if lowering, stop at the beginning of the layer */
         if (!raise)
             break;
This page took 0.019828 seconds and 4 git commands to generate.