Add meta_wayland_get_[x]wayland_display_name

Add private functions for the test framework to use to find out the
wayland and x11 display names, so they can set up the environment for
children.

https://bugzilla.gnome.org/show_bug.cgi?id=736505
This commit is contained in:
Owen W. Taylor 2014-09-11 10:07:34 -04:00
parent 9dd9938c38
commit 0706de5378
2 changed files with 17 additions and 2 deletions

View File

@ -446,8 +446,20 @@ meta_wayland_init (void)
if (!meta_xwayland_start (&compositor->xwayland_manager, compositor->wayland_display)) if (!meta_xwayland_start (&compositor->xwayland_manager, compositor->wayland_display))
g_error ("Failed to start X Wayland"); g_error ("Failed to start X Wayland");
set_gnome_env ("DISPLAY", compositor->xwayland_manager.display_name); set_gnome_env ("DISPLAY", meta_wayland_get_xwayland_display_name (compositor));
set_gnome_env ("WAYLAND_DISPLAY", compositor->display_name); 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 void

View File

@ -44,5 +44,8 @@ void meta_wayland_compositor_set_input_focus (MetaWaylandComp
void meta_wayland_compositor_paint_finished (MetaWaylandCompositor *compositor); 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 #endif