summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2017-03-29 19:49:10 +0200
committerDave Davenport <qball@gmpclient.org>2017-03-29 19:49:10 +0200
commit904ab9eafce2965f51082c93c9da906d2d25c317 (patch)
tree85ee043c4d8a2636564eb67d088caa95157a3b74
parent30026ea0a74f41eadae448922b929dc5b30e3ed1 (diff)
Force sync and finishing of pending requests before shutting disconnecting from X11 #576
-rw-r--r--source/x11-helper.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/x11-helper.c b/source/x11-helper.c
index 67d3e74e..9388ca3e 100644
--- a/source/x11-helper.c
+++ b/source/x11-helper.c
@@ -36,6 +36,7 @@
#include <cairo-xcb.h>
#include <xcb/xcb.h>
+#include <xcb/xcb_aux.h>
#include <xcb/randr.h>
#include <xcb/xinerama.h>
#include <xcb/xcb_ewmh.h>
@@ -891,8 +892,10 @@ void xcb_stuff_wipe ( xcb_stuff *xcb )
xcb->sndisplay = NULL;
}
x11_monitors_free ();
- xcb_disconnect ( xcb->connection );
xcb_ewmh_connection_wipe ( &( xcb->ewmh ) );
+ xcb_flush ( xcb->connection );
+ xcb_aux_sync ( xcb->connection );
+ xcb_disconnect ( xcb->connection );
xcb->connection = NULL;
xcb->screen = NULL;
xcb->screen_nbr = 0;