summaryrefslogtreecommitdiff
path: root/openbox/focus.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-03-12 02:41:34 +0000
committerDana Jansens <danakj@orodu.net>2007-03-12 02:41:34 +0000
commit52176d1485e77ba3280ba210b4503eca20928af6 (patch)
tree96c5e99076860651fd1423f6703202e0972c5436 /openbox/focus.c
parentd113b9f33fb7031add7026d123f34b31888d7411 (diff)
roll back focus fallback change, so it behaves well with new stacking
Diffstat (limited to 'openbox/focus.c')
-rw-r--r--openbox/focus.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/openbox/focus.c b/openbox/focus.c
index 7b40db5e..e73a3127 100644
--- a/openbox/focus.c
+++ b/openbox/focus.c
@@ -244,11 +244,14 @@ static ObClient* focus_fallback_transient(ObClient *top, ObClient *old)
return NULL;
}
-ObClient* focus_fallback_target(ObFocusFallbackType type, ObClient *old)
+ObClient* focus_fallback_target(ObFocusFallbackType type)
{
GList *it;
+ ObClient *old;
ObClient *target = NULL;
+ old = focus_client;
+
if ((type == OB_FOCUS_FALLBACK_UNFOCUSING
|| type == OB_FOCUS_FALLBACK_CLOSED) && old) {
if (old->transient_for) {
@@ -257,8 +260,8 @@ ObClient* focus_fallback_target(ObFocusFallbackType type, ObClient *old)
if (!config_focus_follow || config_focus_last)
trans = TRUE;
else if ((target = client_under_pointer()) &&
- (client_search_transient
- (client_search_top_parent(target), old)))
+ client_search_transient
+ (client_search_top_parent(target), old))
trans = TRUE;
/* try for transient relations */
@@ -337,7 +340,6 @@ ObClient* focus_fallback_target(ObFocusFallbackType type, ObClient *old)
void focus_fallback(ObFocusFallbackType type)
{
ObClient *new;
- ObClient *old = focus_client;
/* unfocus any focused clients.. they can be focused by Pointer events
and such, and then when I try focus them, I won't get a FocusIn event
@@ -345,7 +347,7 @@ void focus_fallback(ObFocusFallbackType type)
*/
focus_set_client(NULL);
- if ((new = focus_fallback_target(type, old)))
+ if ((new = focus_fallback_target(type)))
client_focus(new);
}