X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Ffocus.c;h=d78591ba05e79847594888f565dc59676532eff5;hb=f43067b77244cc002c5bc5bec0676ae213164724;hp=b81e5632c4dbd68148177e3cfb98ebaa323265c6;hpb=3afbf3d597ef45a122ae58203a126c57f9796f7b;p=chaz%2Fopenbox diff --git a/openbox/focus.c b/openbox/focus.c index b81e5632..d78591ba 100644 --- a/openbox/focus.c +++ b/openbox/focus.c @@ -1,7 +1,7 @@ /* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*- focus.c for the Openbox window manager - Copyright (c) 2004 Mikael Magnusson + Copyright (c) 2006 Mikael Magnusson Copyright (c) 2003 Ben Jansens This program is free software; you can redistribute it and/or modify @@ -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); } }