]> Dogcows Code - chaz/openbox/blobdiff - openbox/event.c
don't make omnipresent windows lose focus when changing desktops. this is done by...
[chaz/openbox] / openbox / event.c
index 522305a821765728cbd8816c59f33032d4fc6898..9c47c04a3a49e42290a94bfea25dd6ba4adb122c 100644 (file)
@@ -489,7 +489,7 @@ static void event_process(const XEvent *ec, gpointer data)
 
             focus_left_screen = FALSE;
 
-            focus_fallback(FALSE, config_focus_under_mouse, TRUE);
+            focus_fallback(FALSE, config_focus_under_mouse, TRUE, TRUE);
 
             /* We don't get a FocusOut for this case, because it's just moving
                from our Inferior up to us. This happens when iconifying a
@@ -498,10 +498,10 @@ static void event_process(const XEvent *ec, gpointer data)
             /* focus_set_client(NULL) has already been called */
             client_calc_layer(client);
         }
-        if (e->xfocus.detail == NotifyPointerRoot ||
-            e->xfocus.detail == NotifyDetailNone ||
-            e->xfocus.detail == NotifyInferior ||
-            e->xfocus.detail == NotifyNonlinear)
+        else if (e->xfocus.detail == NotifyPointerRoot ||
+                 e->xfocus.detail == NotifyDetailNone ||
+                 e->xfocus.detail == NotifyInferior ||
+                 e->xfocus.detail == NotifyNonlinear)
         {
             XEvent ce;
 
@@ -541,7 +541,8 @@ static void event_process(const XEvent *ec, gpointer data)
                 */
 
                 if (!focus_left_screen)
-                    focus_fallback(FALSE, config_focus_under_mouse, TRUE);
+                    focus_fallback(FALSE, config_focus_under_mouse,
+                                   TRUE, TRUE);
             }
         }
         else if (!client)
@@ -597,7 +598,7 @@ static void event_process(const XEvent *ec, gpointer data)
                 ob_debug_type(OB_DEBUG_FOCUS,
                               "Focus went to an unmanaged window 0x%x !\n",
                               ce.xfocus.window);
-                focus_fallback(TRUE, config_focus_under_mouse, TRUE);
+                focus_fallback(TRUE, config_focus_under_mouse, TRUE, TRUE);
             }
         }
 
@@ -753,7 +754,7 @@ void event_enter_client(ObClient *client)
             data->time = event_curtime;
 
             ob_main_loop_timeout_add(ob_main_loop,
-                                     config_focus_delay,
+                                     config_focus_delay * 1000,
                                      focus_delay_func,
                                      data, focus_delay_cmp, focus_delay_dest);
         } else {
@@ -1504,7 +1505,8 @@ static void event_handle_client(ObClient *client, XEvent *e)
         }
         else if (msgtype == prop_atoms.net_wm_user_time) {
             guint32 t;
-            if (PROP_GET32(client->window, net_wm_user_time, cardinal, &t) &&
+            if (client == focus_client &&
+                PROP_GET32(client->window, net_wm_user_time, cardinal, &t) &&
                 t && !event_time_after(t, e->xproperty.time) &&
                 (!event_last_user_time ||
                  event_time_after(t, event_last_user_time)))
This page took 0.022819 seconds and 4 git commands to generate.