From: Michael Stapelberg Date: Thu, 27 Dec 2012 15:54:54 +0000 (+0100) Subject: unregister as window manager before restarting (fixes a race condition) X-Git-Tag: 4.5~68 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=54fd3d34800a5c25216220c56c75c214f2233c91;p=i3%2Fi3 unregister as window manager before restarting (fixes a race condition) --- diff --git a/src/manage.c b/src/manage.c index 328858a9..f768ccb5 100644 --- a/src/manage.c +++ b/src/manage.c @@ -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); }