X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=openbox%2Ffocus.c;h=6a56c2f819bccd72ca767e866e1fe6ee64a94bc4;hb=3039eb960c9e300a0aa4d9e90deda0a20b6af778;hp=b81e5632c4dbd68148177e3cfb98ebaa323265c6;hpb=3afbf3d597ef45a122ae58203a126c57f9796f7b;p=chaz%2Fopenbox diff --git a/openbox/focus.c b/openbox/focus.c index b81e5632..6a56c2f8 100644 --- a/openbox/focus.c +++ b/openbox/focus.c @@ -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); } }