]> Dogcows Code - chaz/openbox/commitdiff
there's this case where we DONT want to ignore both events or we end up without anyth...
authorDana Jansens <danakj@orodu.net>
Sat, 24 May 2003 08:38:37 +0000 (08:38 +0000)
committerDana Jansens <danakj@orodu.net>
Sat, 24 May 2003 08:38:37 +0000 (08:38 +0000)
openbox/event.c

index 478567f3f3d2051d285bc7d8708586f44d90a643..b6126464ccb5119a1ce76e3f7cd33149e9ad05d6 100644 (file)
@@ -341,14 +341,33 @@ static gboolean event_ignore(XEvent *e, Client *client)
                     g_message("found pending FocusIn");
 #endif
                     /* is the focused window getting a FocusOut/In back to
-                       itself? */
+                       itself?
+                    */
                     if (fe.xfocus.window == e->xfocus.window &&
                         !event_ignore(&fe, client)) {
+                        /*
+                          if focus_client is not set, then we can't do
+                          this. we need the FocusIn. This happens in the
+                          case when the set_focus_client(NULL) in the
+                          focus_fallback function fires and then
+                          focus_fallback picks the currently focused
+                          window (such as on a SendToDesktop-esque action.
+                        */
+                        if (focus_client) {
 #ifdef DEBUG_FOCUS
-                        g_message("focused window got an Out/In back to "
-                                  "itself IGNORED both");
+                            g_message("focused window got an Out/In back to "
+                                      "itself IGNORED both");
 #endif
-                        return TRUE;
+                            return TRUE;
+                        } else {
+                            event_process(&fe);
+#ifdef DEBUG_FOCUS
+                            g_message("focused window got an Out/In back to "
+                                      "itself but focus_client was null "
+                                      "IGNORED just the Out");
+#endif
+                            return TRUE;
+                        }
                     }
 
                     /* once all the FocusOut's have been dealt with, if there
This page took 0.032131 seconds and 4 git commands to generate.