]> git.sur5r.net Git - i3/i3/commitdiff
Merge branch 'fix-unmap'
authorMichael Stapelberg <michael@stapelberg.de>
Tue, 28 May 2013 17:56:57 +0000 (19:56 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Tue, 28 May 2013 17:56:57 +0000 (19:56 +0200)
src/tree.c

index 32bec965d0b5236c0e3338016b8854fddb8a5fb2..6d23750f8b4604cb65e80da2db0aab6fd9ae1a81 100644 (file)
@@ -235,7 +235,12 @@ bool tree_close(Con *con, kill_window_t kill_window, bool dont_kill_parent, bool
             return false;
         } else {
             xcb_void_cookie_t cookie;
-            /* un-parent the window */
+            /* Ignore any further events by clearing the event mask,
+             * unmap the window,
+             * then reparent it to the root window. */
+            xcb_change_window_attributes(conn, con->window->id,
+                    XCB_CW_EVENT_MASK, (uint32_t[]){ XCB_NONE });
+            xcb_unmap_window(conn, con->window->id);
             cookie = xcb_reparent_window(conn, con->window->id, root, 0, 0);
 
             /* Ignore X11 errors for the ReparentWindow request.