]> Dogcows Code - chaz/openbox/blobdiff - openbox/event.c
German translation update
[chaz/openbox] / openbox / event.c
index 522305a821765728cbd8816c59f33032d4fc6898..eb6786501a7adc078fee3102661f6d3c075f0c47 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)))
@@ -1857,6 +1859,8 @@ static void focus_delay_client_dest(ObClient *client, gpointer data)
 
 void event_halt_focus_delay()
 {
+    /* ignore all enter events up till now */
+    event_end_ignore_all_enters(1);
     ob_main_loop_timeout_remove(ob_main_loop, focus_delay_func);
 }
 
This page took 0.027909 seconds and 4 git commands to generate.