]> Dogcows Code - chaz/openbox/commitdiff
focusins can occur on windows that aren't clients when there's latency involved....
authorDana Jansens <danakj@orodu.net>
Mon, 12 Mar 2007 06:09:02 +0000 (06:09 +0000)
committerDana Jansens <danakj@orodu.net>
Mon, 12 Mar 2007 06:09:02 +0000 (06:09 +0000)
openbox/event.c

index 16ec8e0a6ad851b253c632de5031b2d4395776fd..1f0d15595ff95d0eb2cb48f2db539a175cf4b829 100644 (file)
@@ -433,7 +433,7 @@ static void event_process(const XEvent *ec, gpointer data)
             }
         }
 
-#if 1 /* focus debugging stuff */
+#if 0 /* focus debugging stuff */
     if (e->type == FocusIn || e->type == FocusOut) {
         gint mode = e->xfocus.mode;
         gint detail = e->xfocus.detail;
@@ -664,7 +664,7 @@ static void event_handle_client(ObClient *client, XEvent *e)
         /* Look for the followup FocusIn */
         if (!XCheckIfEvent(ob_display, &ce, look_for_focusin, NULL)) {
             /* There is no FocusIn, move focus where we can still hear events*/
-            focus_set_client(NULL);
+            focus_fallback(OB_FOCUS_FALLBACK_NOFOCUS);
         } else if (ce.xany.window == e->xany.window) {
             /* If focus didn't actually move anywhere, there is nothing to do*/
             break;
@@ -674,8 +674,8 @@ static void event_handle_client(ObClient *client, XEvent *e)
             event_process(&ce, &ed);
             if (ed.ignored) {
                 /* The FocusIn was ignored, this means it was on a window
-                   that isn't a client? How did this happen? */
-                g_assert_not_reached();
+                   that isn't a client. */
+                focus_fallback(OB_FOCUS_FALLBACK_NOFOCUS);
             }
         }
 
This page took 0.027528 seconds and 4 git commands to generate.