summaryrefslogtreecommitdiff
path: root/openbox/focus.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-03-11 17:05:07 +0000
committerDana Jansens <danakj@orodu.net>2007-03-11 17:05:07 +0000
commitfe317164865f5a08e18bb0b4fa9519fa4ca48a45 (patch)
tree932b09c355a296dfc3da043b3fff343fe73afa4d /openbox/focus.c
parent62a39c4c70b0ed8e153b0cccac853cc6fded99ba (diff)
fallback to transient parents properly
Diffstat (limited to 'openbox/focus.c')
-rw-r--r--openbox/focus.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/openbox/focus.c b/openbox/focus.c
index 73cb6f52..a84d253a 100644
--- a/openbox/focus.c
+++ b/openbox/focus.c
@@ -244,14 +244,11 @@ static ObClient* focus_fallback_transient(ObClient *top, ObClient *old)
return NULL;
}
-ObClient* focus_fallback_target(ObFocusFallbackType type)
+ObClient* focus_fallback_target(ObFocusFallbackType type, ObClient *old)
{
GList *it;
- ObClient *old = NULL;
ObClient *target = NULL;
- old = focus_client;
-
if ((type == OB_FOCUS_FALLBACK_UNFOCUSING
|| type == OB_FOCUS_FALLBACK_CLOSED) && old) {
if (old->transient_for) {
@@ -336,6 +333,7 @@ ObClient* focus_fallback_target(ObFocusFallbackType type)
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
@@ -343,7 +341,7 @@ void focus_fallback(ObFocusFallbackType type)
*/
focus_set_client(NULL);
- if ((new = focus_fallback_target(type)))
+ if ((new = focus_fallback_target(type, old)))
client_focus(new);
}