From b8fded742abad3c43c708ee935f5b58237170a01 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sun, 27 May 2007 22:50:40 +0000 Subject: make focuslast only apply to switching desktops, like 3.3.1 --- openbox/focus.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'openbox/focus.c') 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; } -- cgit v1.2.3