]> Dogcows Code - chaz/openbox/blobdiff - openbox/client.c
put the separator back in the spit up client list menu
[chaz/openbox] / openbox / client.c
index 86acafb11ae23cb31c4284f012b69347b53bcff7..dc4e52d25e33ab3a5baf16dbd4e5287ff30d7ca5 100644 (file)
@@ -506,17 +506,18 @@ void client_unmanage(ObClient *self)
 
     g_assert(self != NULL);
 
+    /* we dont want events no more. do this before hiding the frame so we
+       don't generate more events */
+    XSelectInput(ob_display, self->window, NoEventMask);
+
     frame_hide(self->frame);
-    /* sync to send the hide to the server quickly, and to get back the enter
-       events */
-    XSync(ob_display, FALSE);
+    /* flush to send the hide to the server quickly */
+    XFlush(ob_display);
 
     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();
     }
 
 
@@ -526,9 +527,6 @@ void client_unmanage(ObClient *self)
     /* remove the window from our save set */
     XChangeSaveSet(ob_display, self->window, SetModeDelete);
 
-    /* we dont want events no more */
-    XSelectInput(ob_display, self->window, NoEventMask);
-
     /* update the focus lists */
     focus_order_remove(self);
 
This page took 0.024018 seconds and 4 git commands to generate.