From 904ab9eafce2965f51082c93c9da906d2d25c317 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Wed, 29 Mar 2017 19:49:10 +0200 Subject: Force sync and finishing of pending requests before shutting disconnecting from X11 #576 --- source/x11-helper.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 #include +#include #include #include #include @@ -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; -- cgit v1.2.3