]> Dogcows Code - chaz/openbox/blobdiff - openbox/focus.c
really fix focus_last?
[chaz/openbox] / openbox / focus.c
index b81e5632c4dbd68148177e3cfb98ebaa323265c6..6a56c2f819bccd72ca767e866e1fe6ee64a94bc4 100644 (file)
@@ -249,7 +249,8 @@ ObClient* focus_fallback_target(ObFocusFallbackType type)
 
     old = focus_client;
 
-    if (type == OB_FOCUS_FALLBACK_UNFOCUSING && old) {
+    if ((type == OB_FOCUS_FALLBACK_UNFOCUSING
+         || type == OB_FOCUS_FALLBACK_CLOSED) && old) {
         if (old->transient_for) {
             gboolean trans = FALSE;
 
@@ -290,7 +291,9 @@ ObClient* focus_fallback_target(ObFocusFallbackType type)
         }
     }
 
-    if (config_focus_follow && !config_focus_last) {
+    if (config_focus_follow &&
+        (type == OB_FOCUS_FALLBACK_UNFOCUSING || !config_focus_last))
+    {
         if ((target = client_under_pointer()))
             if (client_normal(target) && client_can_focus(target))
                 return target;
@@ -749,7 +752,7 @@ static void to_bottom(ObClient *c, guint d)
         /* insert before first iconic window */
         for (it = focus_order[d];
              it && !((ObClient*)it->data)->iconic; it = g_list_next(it));
-        g_list_insert_before(focus_order[d], it, c);
+        focus_order[d] = g_list_insert_before(focus_order[d], it, c);
     }
 }
 
This page took 0.023045 seconds and 4 git commands to generate.