diff --git a/src/wayland/meta-wayland.c b/src/wayland/meta-wayland.c index 32fde1e92..ce4a022db 100644 --- a/src/wayland/meta-wayland.c +++ b/src/wayland/meta-wayland.c @@ -446,8 +446,20 @@ meta_wayland_init (void) if (!meta_xwayland_start (&compositor->xwayland_manager, compositor->wayland_display)) g_error ("Failed to start X Wayland"); - set_gnome_env ("DISPLAY", compositor->xwayland_manager.display_name); - set_gnome_env ("WAYLAND_DISPLAY", compositor->display_name); + set_gnome_env ("DISPLAY", meta_wayland_get_xwayland_display_name (compositor)); + set_gnome_env ("WAYLAND_DISPLAY", meta_wayland_get_wayland_display_name (compositor)); +} + +const char * +meta_wayland_get_wayland_display_name (MetaWaylandCompositor *compositor) +{ + return compositor->display_name; +} + +const char * +meta_wayland_get_xwayland_display_name (MetaWaylandCompositor *compositor) +{ + return compositor->xwayland_manager.display_name; } void diff --git a/src/wayland/meta-wayland.h b/src/wayland/meta-wayland.h index 860395d78..4610da266 100644 --- a/src/wayland/meta-wayland.h +++ b/src/wayland/meta-wayland.h @@ -44,5 +44,8 @@ void meta_wayland_compositor_set_input_focus (MetaWaylandComp void meta_wayland_compositor_paint_finished (MetaWaylandCompositor *compositor); +const char *meta_wayland_get_wayland_display_name (MetaWaylandCompositor *compositor); +const char *meta_wayland_get_xwayland_display_name (MetaWaylandCompositor *compositor); + #endif