X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=openbox%2Ffocus.c;h=6a56c2f819bccd72ca767e866e1fe6ee64a94bc4;hb=3039eb960c9e300a0aa4d9e90deda0a20b6af778;hp=9d16387bfb067549d0c60e3f2e5b14d2a87c0ac4;hpb=0993012776e159a5b94a34034289f2274ad6c7bf;p=chaz%2Fopenbox diff --git a/openbox/focus.c b/openbox/focus.c index 9d16387b..6a56c2f8 100644 --- a/openbox/focus.c +++ b/openbox/focus.c @@ -58,7 +58,7 @@ static void focus_cycle_destructor(ObClient *client, gpointer data) { /* end cycling if the target disappears */ if (focus_cycle_target == client) - focus_cycle(TRUE, TRUE, TRUE, TRUE, TRUE); + focus_cycle(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE); } static Window createWindow(Window parent, gulong mask, @@ -192,7 +192,7 @@ void focus_set_client(ObClient *client) /* in the middle of cycling..? kill it. */ if (focus_cycle_target) - focus_cycle(TRUE, TRUE, TRUE, TRUE, TRUE); + focus_cycle(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE); old = focus_client; focus_client = client; @@ -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); } }