Bugfix: Send WM_DELETE / kill window the right way (Thanks dothebart)

Fixes #336
This commit is contained in:
Michael Stapelberg 2011-03-09 18:08:01 +01:00
parent a9c549b43f
commit 74b90cd83f

View File

@ -123,9 +123,10 @@ void tree_close(Con *con, bool kill_window, bool dont_kill_parent) {
} }
if (con->window != NULL) { if (con->window != NULL) {
if (kill_window) if (kill_window) {
x_window_kill(con->window->id); x_window_kill(con->window->id);
else { return;
} else {
/* un-parent the window */ /* un-parent the window */
xcb_reparent_window(conn, con->window->id, root, 0, 0); xcb_reparent_window(conn, con->window->id, root, 0, 0);
/* TODO: client_unmap to set state to withdrawn */ /* TODO: client_unmap to set state to withdrawn */