[mutter] Add meta_wayland_get_[x]wayland_display_name
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] Add meta_wayland_get_[x]wayland_display_name
- Date: Fri, 12 Sep 2014 17:19:11 +0000 (UTC)
commit 0706de53789bf757d17bdf723071414ee6805211
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Thu Sep 11 10:07:34 2014 -0400
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
src/wayland/meta-wayland.c | 16 ++++++++++++++--
src/wayland/meta-wayland.h | 3 +++
2 files changed, 17 insertions(+), 2 deletions(-)
---
diff --git a/src/wayland/meta-wayland.c b/src/wayland/meta-wayland.c
index 32fde1e..ce4a022 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 860395d..4610da2 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]