]> Dogcows Code - chaz/openbox/blobdiff - openbox/client.c
super amazing enter event skipping.
[chaz/openbox] / openbox / client.c
index 9b4932a0fe2f1c940db314166b04a2982ccab68c..daa65379f3d50e4201a60c7ea0f91976c3ed7126 100644 (file)
@@ -629,6 +629,7 @@ void client_unmanage(ObClient *self)
 {
     guint j;
     GSList *it;
+    gulong ignore_start;
 
     ob_debug("Unmanaging window: 0x%x plate 0x%x (%s) (%s)\n",
              self->window, self->frame->window,
@@ -640,15 +641,16 @@ void client_unmanage(ObClient *self)
        don't generate more events */
     XSelectInput(ob_display, self->window, NoEventMask);
 
+    /* ignore enter events from the unmap so it doesnt mess with the focus */
+    if (!client_focused(self) || !config_focus_under_mouse)
+        ignore_start = event_start_ignore_all_enters();
+
     frame_hide(self->frame);
     /* flush to send the hide to the server quickly */
     XFlush(ob_display);
 
-    if (!client_focused(self) || !config_focus_under_mouse) {
-        /* ignore enter events from the unmap so it doesnt mess with the
-           focus */
-        event_ignore_all_queued_enters();
-    }
+    if (!client_focused(self) || !config_focus_under_mouse)
+        event_end_ignore_all_enters(ignore_start);
 
     mouse_grab_for_client(self, FALSE);
 
This page took 0.021927 seconds and 4 git commands to generate.