]> Dogcows Code - chaz/openbox/commitdiff
less negatives means less confusing.. but yeah. get rid of omnipresent check in focus...
authorDana Jansens <danakj@orodu.net>
Fri, 25 May 2007 15:41:14 +0000 (15:41 +0000)
committerDana Jansens <danakj@orodu.net>
Fri, 25 May 2007 15:41:14 +0000 (15:41 +0000)
openbox/focus.c
openbox/screen.c

index 0f9f2f1bba29ed47a1f0a35b9eb770700ba3a84f..fad53e92dcf67897f927076129ce3f2465f44ad6 100644 (file)
@@ -110,17 +110,6 @@ static ObClient* focus_fallback_target(gboolean allow_refocus, ObClient *old)
             return c;
         }
 
-    ob_debug_type(OB_DEBUG_FOCUS, "trying omnipresentness\n");
-    if (allow_refocus && old &&
-        old->desktop == DESKTOP_ALL &&
-        client_normal(old) &&
-        client_focus(old))
-    {
-        ob_debug_type(OB_DEBUG_FOCUS, "found in omnipresentness\n");
-        return old;
-    }
-
-
     ob_debug_type(OB_DEBUG_FOCUS, "trying the focus order\n");
     for (it = focus_order; it; it = g_list_next(it)) {
         c = it->data;
index 2e8965e2cd957d609ec13e24fa83e4d43bbcc010..381753ae9d8fcc67e4b4e9eeca0c298b06bda11a 100644 (file)
@@ -530,16 +530,17 @@ void screen_set_desktop(guint num, gboolean dofocus)
         }
     }
 
+    if (focus_client && (focus_client->desktop == DESKTOP_ALL ||
+                         focus_client->desktop == screen_desktop))
+        dofocus = FALSE;
+
     /* have to try focus here because when you leave an empty desktop
        there is no focus out to watch for
 
        do this before hiding the windows so if helper windows are coming
        with us, they don't get hidden
     */
-    if (dofocus
-        && (!focus_client || (focus_client->desktop != DESKTOP_ALL
-                              && focus_client->desktop != num))
-        && (c = focus_fallback(TRUE)))
+    if (dofocus && (c = focus_fallback(TRUE)))
     {
         /* only do the flicker reducing stuff ahead of time if we are going
            to call xsetinputfocus on the window ourselves. otherwise there is
This page took 0.024536 seconds and 4 git commands to generate.