diff options
author | Rob Bradford <rob@linux.intel.com> | 2013-04-12 18:39:20 +0100 |
---|---|---|
committer | Rob Bradford <rob@linux.intel.com> | 2013-04-12 18:43:36 +0100 |
commit | bff5b2ae3ee51e83564ead19f410be9ff0c00326 (patch) | |
tree | 3f3a1b7a5eaeb920ddbc742edffa9bb0f48a9f2e /gdk | |
parent | b0121ed0a15743bc518d5d3e02beb4fadd43cc09 (diff) | |
download | gtk+-bff5b2ae3ee51e83564ead19f410be9ff0c00326.tar.gz |
wayland: Don't "probe" for a Wayland compositor if started from compositor
In the case that the client is started directly by the compositor the
WAYLAND_SOCKET environment variable is set containing the fd to use that was
created by a socketpair.
This environment variable is consumed by a call to wl_display_connect so a
second call will not take advantage of it.
https://bugzilla.gnome.org/show_bug.cgi?id=697673
Diffstat (limited to 'gdk')
-rw-r--r-- | gdk/wayland/gdkdisplaymanager-wayland.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gdk/wayland/gdkdisplaymanager-wayland.c b/gdk/wayland/gdkdisplaymanager-wayland.c index 5d4e12beab..0d73a78364 100644 --- a/gdk/wayland/gdkdisplaymanager-wayland.c +++ b/gdk/wayland/gdkdisplaymanager-wayland.c @@ -59,6 +59,12 @@ gdk_wayland_display_manager_initable_init (GInitable *initable, { struct wl_display *wl_display; + /* Set by the compositor when launching a special client - and it gets reset + * by wl_display_connect so we must avoid calling it twice + */ + if (g_getenv ("WAYLAND_SOCKET")) + return TRUE; + /* check that a connection to the default display is possible */ wl_display = wl_display_connect (gdk_get_display_arg_name ()); |