[PATCH] compositor-x11: Flush xcb connection from x11_output_destroy()

Armin Krezović krezovic.armin at gmail.com
Thu Jun 30 04:29:00 UTC 2016


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 at gmail.com>
---
 libweston/compositor-x11.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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 @@ x11_output_destroy(struct weston_output *output_base)
 
 	xcb_destroy_window(backend->conn, output->window);
 
+	xcb_flush(backend->conn);
+
 	weston_output_destroy(&output->base);
 
 	free(output);
@@ -982,8 +984,6 @@ x11_backend_delete_window(struct x11_backend *b, xcb_window_t window)
 	if (output)
 		x11_output_destroy(&output->base);
 
-	xcb_flush(b->conn);
-
 	if (wl_list_empty(&b->compositor->output_list))
 		weston_compositor_exit(b->compositor);
 }
-- 
2.9.0



More information about the wayland-devel mailing list