compositor-x11: Flush xcb connection from x11_output_destroy()

Current code flushes the connection when it receives
a delete window request. This means that a destroyed
window will remain available when X11 output gets
removed differently (ie, from a testing module).

Signed-off-by: Armin Krezović <krezovic.armin@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
diff --git a/libweston/compositor-x11.c b/libweston/compositor-x11.c
index a3319b4..e2e6110 100644
--- a/libweston/compositor-x11.c
+++ b/libweston/compositor-x11.c
@@ -519,6 +519,8 @@
 
 	xcb_destroy_window(backend->conn, output->window);
 
+	xcb_flush(backend->conn);
+
 	weston_output_destroy(&output->base);
 
 	free(output);
@@ -982,8 +984,6 @@
 	if (output)
 		x11_output_destroy(&output->base);
 
-	xcb_flush(b->conn);
-
 	if (wl_list_empty(&b->compositor->output_list))
 		weston_compositor_exit(b->compositor);
 }