transients are always kept in the same layer
authorDana Jansens <danakj@orodu.net>
Tue, 22 Dec 2009 16:38:11 +0000 (11:38 -0500)
committerDana Jansens <danakj@orodu.net>
Tue, 22 Dec 2009 16:44:53 +0000 (11:44 -0500)
openbox/focus.c
openbox/stacking.c

index 94af9846947c655ee28be16198662f77fab6cdff..ed007a036ac89333e160a94cd63faa621e1b8097 100644 (file)
@@ -61,9 +61,10 @@ static void push_to_top(ObClient *client)
 
     /* if it is modal for a single window, then put that window at the top
        of the focus order first, so it will be right after ours. the same is
-       done with stacking */
-    if (client->modal && (p = client_direct_parent(client)) &&
-        p->layer == client->layer)
+       done with stacking
+       (transients are always in the same layer)
+    */
+    if (client->modal && (p = client_direct_parent(client)))
         push_to_top(p);
 
     focus_order = g_list_remove(focus_order, client);
index 44ccf9df214547db0de887b03abeb6414eacf593..9f7914a627a2fd0d8be8caa0abea808bfaad4a4f 100644 (file)
@@ -302,9 +302,10 @@ static void get_restack_order(ObClient *selected, gboolean 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)) &&
-               p->layer == selected->layer)
+           top too, the same is done with the focus order
+           (transients are always in the same layer)
+        */
+        while (selected->modal && (p = client_direct_parent(selected)))
             selected = p;
     }