summaryrefslogtreecommitdiff
path: root/openbox/focus.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-05-27 22:50:40 +0000
committerDana Jansens <danakj@orodu.net>2007-05-27 22:50:40 +0000
commitb8fded742abad3c43c708ee935f5b58237170a01 (patch)
tree460eda8e5419796c4667bcb5b02db918ba28e5ee /openbox/focus.c
parent568ca95bc222b1c694fbd77ce417fd04630846ae (diff)
make focuslast only apply to switching desktops, like 3.3.1
Diffstat (limited to 'openbox/focus.c')
-rw-r--r--openbox/focus.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/openbox/focus.c b/openbox/focus.c
index 6713d98d..59dd0d0d 100644
--- a/openbox/focus.c
+++ b/openbox/focus.c
@@ -95,13 +95,15 @@ void focus_set_client(ObClient *client)
}
}
-static ObClient* focus_fallback_target(gboolean allow_refocus, ObClient *old)
+static ObClient* focus_fallback_target(gboolean allow_refocus,
+ gboolean allow_pointer,
+ ObClient *old)
{
GList *it;
ObClient *c;
ob_debug_type(OB_DEBUG_FOCUS, "trying pointer stuff\n");
- if (config_focus_follow && !config_focus_last)
+ if (allow_pointer && config_focus_follow)
if ((c = client_under_pointer()) &&
(allow_refocus || c != old) &&
(client_normal(c) &&
@@ -153,7 +155,7 @@ static ObClient* focus_fallback_target(gboolean allow_refocus, ObClient *old)
return NULL;
}
-ObClient* focus_fallback(gboolean allow_refocus)
+ObClient* focus_fallback(gboolean allow_refocus, gboolean allow_pointer)
{
ObClient *new;
ObClient *old = focus_client;
@@ -163,7 +165,7 @@ ObClient* focus_fallback(gboolean allow_refocus)
event at all for them. */
focus_nothing();
- new = focus_fallback_target(allow_refocus, old);
+ new = focus_fallback_target(allow_refocus, allow_pointer, old);
return new;
}