]> Dogcows Code - chaz/openbox/commitdiff
don't focus new windows when the user is in a menu or move/resizing a window
authorDana Jansens <danakj@orodu.net>
Sun, 22 Jul 2007 03:11:42 +0000 (23:11 -0400)
committerDana Jansens <danakj@orodu.net>
Sun, 22 Jul 2007 03:11:42 +0000 (23:11 -0400)
openbox/client.c

index 0392ee35e2a04e28481ac05754b12b247eb76614..a7b616d22eb2f5fd7db0ff62497db7d4a9dfb363 100644 (file)
@@ -452,9 +452,18 @@ void client_manage(Window window)
                       "(last time %u)\n",
                       self->window, self->user_time, last_time);
 
+        if (menu_frame_visible || moveresize_in_progress) {
+            activate = FALSE;
+            ob_debug_type(OB_DEBUG_FOCUS,
+                          "Not focusing the window because the user is inside "
+                          "an Openbox menu or is move/resizing a window and "
+                          "we don't want to interrupt them\n");
+        }
+
         /* if it's on another desktop */
-        if (!(self->desktop == screen_desktop || self->desktop == DESKTOP_ALL)
-            && /* the timestamp is from before you changed desktops */
+        else 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))
         {
This page took 0.032131 seconds and 4 git commands to generate.