Explicitly disconnect in the 'exit' command

This fixes a race condition when running the tests. I think that the X11
server has more time to clean up the resources when we do an explicit
disconnect. The symptom I was seeing was that sometimes, i3 couldn’t
become the window manager on one of the Xdummy instances.
This commit is contained in:
Michael Stapelberg 2012-06-29 23:13:25 +02:00
parent daee3218c9
commit c5d0472158
1 changed files with 1 additions and 0 deletions

View File

@ -1410,6 +1410,7 @@ void cmd_layout(I3_CMD, char *layout_str) {
*/ */
void cmd_exit(I3_CMD) { void cmd_exit(I3_CMD) {
LOG("Exiting due to user command.\n"); LOG("Exiting due to user command.\n");
xcb_disconnect(conn);
exit(0); exit(0);
/* unreached */ /* unreached */