Merge branch 'fix-unmap'

This commit is contained in:
Michael Stapelberg 2013-05-28 19:56:57 +02:00
commit aa8d9214a6
1 changed files with 6 additions and 1 deletions

View File

@ -235,7 +235,12 @@ bool tree_close(Con *con, kill_window_t kill_window, bool dont_kill_parent, bool
return false; return false;
} else { } else {
xcb_void_cookie_t cookie; 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); cookie = xcb_reparent_window(conn, con->window->id, root, 0, 0);
/* Ignore X11 errors for the ReparentWindow request. /* Ignore X11 errors for the ReparentWindow request.