ignore focus changes from grabs always.
authorDana Jansens <danakj@orodu.net>
Sun, 12 Jan 2003 00:30:36 +0000 (00:30 +0000)
committerDana Jansens <danakj@orodu.net>
Sun, 12 Jan 2003 00:30:36 +0000 (00:30 +0000)
otk/eventdispatcher.cc

index d8bd539..ff3b8b6 100644 (file)
@@ -99,6 +99,10 @@ void EventDispatcher::dispatchEvents(void)
 
 void EventDispatcher::dispatchFocus(const XEvent &e)
 {
+  // ignore focus changes from grabs
+  if (e.xfocus.mode == NotifyGrab)
+    return;
+  
   if (e.type == FocusIn) {
     //printf("Got FocusIn!\n");
 
@@ -109,10 +113,6 @@ void EventDispatcher::dispatchFocus(const XEvent &e)
   } else if (e.type == FocusOut) {
     //printf("Got FocusOut!\n");
 
-    // ignore FocusOut changes from grabs
-    if (e.xfocus.mode == NotifyGrab)
-      return;
-  
     // FocusOut events just make us look for FocusIn events. They are ignored
     // otherwise.
     XEvent fi;