]> Dogcows Code - chaz/openbox/blobdiff - openbox/client.c
don't activate and change desktops if the client's not on the current desktop and...
[chaz/openbox] / openbox / client.c
index 8098b3dc25e60a85566fcb6773eff775531c25e1..2ca9b5182fdd6fa8a6716f93fcb2425812ab1b60 100644 (file)
@@ -385,10 +385,18 @@ void client_manage(Window window)
         ob_debug("Want to focus new window 0x%x with time %u (last time %u)\n",
                  self->window, self->user_time, last_time);
 
+        /* if it's on another desktop */
+        if (!(self->desktop == screen_desktop || self->desktop == DESKTOP_ALL)
+            && /* the timestamp is from before you changed desktops */
+            self->user_time && screen_desktop_user_time &&
+            !event_time_after(self->user_time, screen_desktop_user_time))
+        {
+            activate = FALSE;
+        }
         /* If nothing is focused, or a parent was focused, then focus this
            always
         */
-        if (!focus_client || client_search_focus_parent(self) != NULL)
+        else if (!focus_client || client_search_focus_parent(self) != NULL)
             activate = TRUE;
         else
         {
This page took 0.021432 seconds and 4 git commands to generate.