]> Dogcows Code - chaz/openbox/commitdiff
don't focus new windows if they appear on another desktop and a relative is not focused
authorDana Jansens <danakj@orodu.net>
Sat, 4 Aug 2007 16:57:34 +0000 (12:57 -0400)
committerDana Jansens <danakj@orodu.net>
Sat, 4 Aug 2007 16:57:34 +0000 (12:57 -0400)
openbox/client.c

index cc721830153a715e44da59d22564ee791505f117..abb9e2afd2dcac0ee5308d32134a00629e14c17c 100644 (file)
@@ -471,10 +471,10 @@ void client_manage(Window window)
 
         /* if it's on another desktop */
         else if (!(self->desktop == screen_desktop ||
-              self->desktop == DESKTOP_ALL) &&
-            /* the timestamp is from before you changed desktops */
-            launch_time && screen_desktop_user_time &&
-            !event_time_after(launch_time, screen_desktop_user_time))
+                   self->desktop == DESKTOP_ALL) &&
+                 /* the timestamp is from before you changed desktops */
+                 launch_time && screen_desktop_user_time &&
+                 !event_time_after(launch_time, screen_desktop_user_time))
         {
             activate = FALSE;
             raise = TRUE;
@@ -526,6 +526,15 @@ void client_manage(Window window)
                               "Not focusing the window because another window "
                               "would get the focus anyway\n");
             }
+            else if (!(self->desktop == screen_desktop ||
+                       self->desktop == DESKTOP_ALL))
+            {
+                activate = FALSE;
+                raise = TRUE;
+                ob_debug_type(OB_DEBUG_FOCUS,
+                              "Not focusing the window because it is on "
+                              "another desktop and no relatives are focused ");
+            }
         }
 
         if (!activate) {
This page took 0.025782 seconds and 4 git commands to generate.