diff --git a/src/wayland/meta-xwayland-private.h b/src/wayland/meta-xwayland-private.h index ef5a3db51..481cffd22 100644 --- a/src/wayland/meta-xwayland-private.h +++ b/src/wayland/meta-xwayland-private.h @@ -29,7 +29,8 @@ meta_xwayland_init (MetaXWaylandManager *manager, struct wl_display *display); void -meta_xwayland_complete_init (MetaDisplay *display); +meta_xwayland_complete_init (MetaDisplay *display, + Display *xdisplay); void meta_xwayland_shutdown (MetaXWaylandManager *manager); diff --git a/src/wayland/meta-xwayland.c b/src/wayland/meta-xwayland.c index a25e645bb..1ba3e00c2 100644 --- a/src/wayland/meta-xwayland.c +++ b/src/wayland/meta-xwayland.c @@ -790,7 +790,8 @@ on_x11_display_closing (MetaDisplay *display) /* To be called right after connecting */ void -meta_xwayland_complete_init (MetaDisplay *display) +meta_xwayland_complete_init (MetaDisplay *display, + Display *xdisplay) { MetaWaylandCompositor *compositor = meta_wayland_compositor_get_default (); MetaXWaylandManager *manager = &compositor->xwayland_manager; diff --git a/src/x11/meta-x11-display.c b/src/x11/meta-x11-display.c index 397c9610e..023c9cc1f 100644 --- a/src/x11/meta-x11-display.c +++ b/src/x11/meta-x11-display.c @@ -1119,14 +1119,13 @@ meta_x11_display_new (MetaDisplay *display, GError **error) g_assert (prepared_gdk_display); gdk_display = g_steal_pointer (&prepared_gdk_display); + xdisplay = GDK_DISPLAY_XDISPLAY (gdk_display); #ifdef HAVE_WAYLAND if (meta_is_wayland_compositor ()) - meta_xwayland_complete_init (display); + meta_xwayland_complete_init (display, xdisplay); #endif - xdisplay = GDK_DISPLAY_XDISPLAY (gdk_display); - if (meta_is_syncing ()) XSynchronize (xdisplay, True);