]> git.sur5r.net Git - i3/i3/commitdiff
unregister as window manager before restarting (fixes a race condition)
authorMichael Stapelberg <michael@stapelberg.de>
Thu, 27 Dec 2012 15:54:54 +0000 (16:54 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Thu, 27 Dec 2012 15:54:54 +0000 (16:54 +0100)
src/manage.c

index 328858a9e5e3beca4f329242e3d09777e22ae114..f768ccb54a0a6a1906abda6c7f032cf29677c534 100644 (file)
@@ -64,6 +64,10 @@ void restore_geometry(void) {
                                 con->rect.x, con->rect.y);
         }
 
+    /* Strictly speaking, this line doesn’t really belong here, but since we
+     * are syncing, let’s 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);
 }