[PATCH 6/6 xserver] xwayland: don't race with weston

Tiago Vignatti tiago.vignatti at intel.com
Tue Apr 3 06:58:04 PDT 2012


Signed-off-by: Tiago Vignatti <tiago.vignatti at intel.com>
---
 hw/xfree86/xwayland/xwayland-window.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/hw/xfree86/xwayland/xwayland-window.c b/hw/xfree86/xwayland/xwayland-window.c
index 101ef01..019f452 100644
--- a/hw/xfree86/xwayland/xwayland-window.c
+++ b/hw/xfree86/xwayland/xwayland-window.c
@@ -190,6 +190,11 @@ xwl_realize_window(WindowPtr window)
 	xserver_set_window_id(xwl_screen->xorg_server,
 			      xwl_window->surface, window->drawable.id);
 
+    /* we need to wait in order to avoid a race with Weston WM, when it would
+     * try to anticipate XCB_MAP_NOTIFY, requiring create_surface completed
+     * (for shell_surface_set_toplevel) */
+    wl_display_roundtrip(xwl_screen->display);
+
     wl_surface_set_user_data(xwl_window->surface, xwl_window);
     xwl_window_attach(xwl_window, (*screen->GetWindowPixmap)(window));
 
-- 
1.7.5.4



More information about the wayland-devel mailing list