unregister as window manager before restarting (fixes a race condition)

This commit is contained in:
Michael Stapelberg 2012-12-27 16:54:54 +01:00
parent cde82eafa6
commit 54fd3d3480
1 changed files with 4 additions and 0 deletions

View File

@ -64,6 +64,10 @@ void restore_geometry(void) {
con->rect.x, con->rect.y);
}
/* Strictly speaking, this line doesnt really belong here, but since we
* are syncing, lets un-register as a window manager first */
xcb_change_window_attributes(conn, root, XCB_CW_EVENT_MASK, (uint32_t[]){ XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT });
/* Make sure our changes reach the X server, we restart/exit now */
xcb_aux_sync(conn);
}