]> Dogcows Code - chaz/openbox/commitdiff
use ignore enters instead of removing them from the queue
authorDana Jansens <danakj@orodu.net>
Sun, 22 Apr 2007 16:48:35 +0000 (16:48 +0000)
committerDana Jansens <danakj@orodu.net>
Sun, 22 Apr 2007 16:48:35 +0000 (16:48 +0000)
openbox/client.c
openbox/popup.c

index 86acafb11ae23cb31c4284f012b69347b53bcff7..a65e7400313367609d03a8f92eab07494350423c 100644 (file)
@@ -512,11 +512,9 @@ void client_unmanage(ObClient *self)
     XSync(ob_display, FALSE);
 
     if (focus_client == self) {
-        XEvent e;
-
-        /* focus the last focused window on the desktop, and ignore enter
-           events from the unmap so it doesnt mess with the focus */
-        while (XCheckTypedEvent(ob_display, EnterNotify, &e));
+        /* ignore enter events from the unmap so it doesnt mess with the focus
+         */
+        event_ignore_queued_enters();
     }
 
 
index ee44ed2352688d4a013598630ddb8f88a02e517b..031b1d49c1384b9f4fd58d587a84c5ede75261d8 100644 (file)
@@ -213,14 +213,11 @@ void popup_show(ObPopup *self, gchar *text)
 void popup_hide(ObPopup *self)
 {
     if (self->mapped) {
-        XEvent e;
-
         XUnmapWindow(ob_display, self->bg);
         self->mapped = FALSE;
 
         /* kill enter events cause by this unmapping */
-        XSync(ob_display, FALSE);
-        while (XCheckTypedEvent(ob_display, EnterNotify, &e));
+        event_ignore_queued_enters();
     }
 }
 
This page took 0.027841 seconds and 4 git commands to generate.