]> Dogcows Code - chaz/openbox/blobdiff - openbox/stacking.c
Make clang happier
[chaz/openbox] / openbox / stacking.c
index 03a62dd4413bdc536b2ed0589f71e21fdc4252dc..2a34f71dc4eea10305c1037a0ae24b64d9d4025b 100644 (file)
@@ -69,6 +69,8 @@ static void do_restack(GList *wins, GList *before)
 
 #ifdef DEBUG
     GList *next;
+
+    g_assert(wins);
     /* pls only restack stuff in the same layer at a time */
     for (it = wins; it; it = next) {
         next = g_list_next(it);
@@ -221,6 +223,15 @@ static void restack_windows(ObClient *selected, gboolean raise)
     GList *modals = NULL;
     GList *trans = NULL;
 
+    if (raise) {
+        ObClient *p;
+
+        /* if a window is modal for another single window, then raise it to the
+           top too, the same is done with the focus order */
+        while (selected->modal && (p = client_direct_parent(selected)))
+            selected = p;
+    }
+
     /* remove first so we can't run into ourself */
     it = g_list_find(stacking_list, selected);
     g_assert(it);
This page took 0.0206 seconds and 4 git commands to generate.