]> Dogcows Code - chaz/openbox/blobdiff - openbox/client.c
focus new children if their direct parent is focused
[chaz/openbox] / openbox / client.c
index 4a553224e3c86e3d5c94201339f93b7ea548ca5e..266eea434c8782feb10be076b6ca42fa08513c95 100644 (file)
@@ -277,7 +277,10 @@ void client_manage(Window window)
     client_restore_session_stacking(self);
 
     /* focus the new window? */
-    if (ob_state() != OB_STATE_STARTING && config_focus_new &&
+    if (ob_state() != OB_STATE_STARTING &&
+        (config_focus_new || (self->transient_for &&
+                              self->transient_for != TRAN_GROUP &&
+                              client_focused(self->transient_for))) &&
         /* note the check against Type_Normal/Dialog, not client_normal(self),
            which would also include other types. in this case we want more
            strict rules for focus */
@@ -3031,9 +3034,8 @@ int client_directional_edge_search(ObClient *c, ObDirection dir)
     case OB_DIRECTION_NORTHWEST:
     case OB_DIRECTION_SOUTHWEST:
         /* not implemented */
-        break;
     default:
-            g_assert_not_reached();
+        g_assert_not_reached();
     }
     return dest;
 }
This page took 0.023911 seconds and 4 git commands to generate.