mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
xwayland: pass the X11 display
Pass the X11 display to `meta_xwayland_complete_init()` so that it can be used without poking into GDK. https://gitlab.gnome.org/GNOME/mutter/merge_requests/735
This commit is contained in:
parent
9d65eab549
commit
5fa8b24b2b
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user