mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 17:40:40 -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);
|
struct wl_display *display);
|
||||||
|
|
||||||
void
|
void
|
||||||
meta_xwayland_complete_init (MetaDisplay *display);
|
meta_xwayland_complete_init (MetaDisplay *display,
|
||||||
|
Display *xdisplay);
|
||||||
|
|
||||||
void
|
void
|
||||||
meta_xwayland_shutdown (MetaXWaylandManager *manager);
|
meta_xwayland_shutdown (MetaXWaylandManager *manager);
|
||||||
|
@ -790,7 +790,8 @@ on_x11_display_closing (MetaDisplay *display)
|
|||||||
|
|
||||||
/* To be called right after connecting */
|
/* To be called right after connecting */
|
||||||
void
|
void
|
||||||
meta_xwayland_complete_init (MetaDisplay *display)
|
meta_xwayland_complete_init (MetaDisplay *display,
|
||||||
|
Display *xdisplay)
|
||||||
{
|
{
|
||||||
MetaWaylandCompositor *compositor = meta_wayland_compositor_get_default ();
|
MetaWaylandCompositor *compositor = meta_wayland_compositor_get_default ();
|
||||||
MetaXWaylandManager *manager = &compositor->xwayland_manager;
|
MetaXWaylandManager *manager = &compositor->xwayland_manager;
|
||||||
|
@ -1119,14 +1119,13 @@ meta_x11_display_new (MetaDisplay *display, GError **error)
|
|||||||
|
|
||||||
g_assert (prepared_gdk_display);
|
g_assert (prepared_gdk_display);
|
||||||
gdk_display = g_steal_pointer (&prepared_gdk_display);
|
gdk_display = g_steal_pointer (&prepared_gdk_display);
|
||||||
|
xdisplay = GDK_DISPLAY_XDISPLAY (gdk_display);
|
||||||
|
|
||||||
#ifdef HAVE_WAYLAND
|
#ifdef HAVE_WAYLAND
|
||||||
if (meta_is_wayland_compositor ())
|
if (meta_is_wayland_compositor ())
|
||||||
meta_xwayland_complete_init (display);
|
meta_xwayland_complete_init (display, xdisplay);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
xdisplay = GDK_DISPLAY_XDISPLAY (gdk_display);
|
|
||||||
|
|
||||||
if (meta_is_syncing ())
|
if (meta_is_syncing ())
|
||||||
XSynchronize (xdisplay, True);
|
XSynchronize (xdisplay, True);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user