wayland/src
Dima Ryazanov fb7e130217 client: require WAYLAND_DISPLAY to be set
Although defaulting to wayland-0 seems convenient, it has an undesirable
side effect: clients may unintentionally connect to the wrong compositor.
Generally, it's safer to fail instead. Here's a real example:

In Fedora 22, Gtk+ prefers Wayland over X11, though the default session is still
a normal X11 Gnome session. When you launch a Gtk+ app, it will try Wayland,
fail, then try X11, and succesfully start up. That works fine.

Now suppose you launch Weston while running the Gnome session. Suddenly, all
of the Gtk+ apps launched from Gnome will show up inside Weston instead.
That's unexpected. There's also no good way to prevent that from happening
(other than perhaps setting WAYLAND_DISPLAY to an invalid value when launching
an app).

Not using wayland-0 as the default will solve that problem: an app launched
from the X11 Gnome session will use the X11 backend regardless of whether
there's a wayland compositor running at the same time.

Everything else should work as before. The compositor already sets
the WAYLAND_DISPLAY when starting the session, so the lack of the default value
should not make a difference to the user.

Signed-off-by: Dima Ryazanov <dima@gmail.com>
Acked-by: Pekka Paalanen <ppaalanen@gmail.com>
Acked-by: Giulio Camuffo <giuliocamuffo@gmail.com>
Acked-by: Daniel Stone <daniel@fooishbar.org>
Acked-by: Jasper St. Pierre <jstpierre@mecheye.net>
Reviewed-by: Ryo Munakata <ryomnktml@gmail.com>

[Pekka: dropped the wayland-server.c hunk, adjusted summary]

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-08-14 10:14:05 +03:00
..
.gitignore gitignore: adpat to scanner and protocol path changes 2014-11-19 16:35:49 +02:00
connection.c src: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-12 15:31:24 -07:00
event-loop.c cosmetic: gratuitous whitespace changes in event-loop.c 2015-06-23 10:27:23 +03:00
scanner.c scanner: check sanity of version 2015-07-30 18:33:31 -07:00
scanner.mk Rename source subdir from wayland to src 2011-08-12 16:25:14 -04:00
wayland-client-core.h src: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-12 15:31:24 -07:00
wayland-client-uninstalled.pc.in build: add uninstalled pkg-config files 2012-05-29 10:09:59 -04:00
wayland-client.c client: require WAYLAND_DISPLAY to be set 2015-08-14 10:14:05 +03:00
wayland-client.h src: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-12 15:31:24 -07:00
wayland-client.pc.in Export the Wayland protocol XML file 2013-09-21 21:48:56 -07:00
wayland-egl-core.h src: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-12 15:31:24 -07:00
wayland-egl.h src: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-12 15:31:24 -07:00
wayland-os.c src: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-12 15:31:24 -07:00
wayland-os.h src: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-12 15:31:24 -07:00
wayland-private.h src: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-12 15:31:24 -07:00
wayland-scanner-uninstalled.pc.in build: Add wayland-scanner.pc. 2013-07-03 16:38:12 -04:00
wayland-scanner.pc.in build: Add wayland-scanner.pc. 2013-07-03 16:38:12 -04:00
wayland-server-core.h src: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-12 15:31:24 -07:00
wayland-server-uninstalled.pc.in build: add uninstalled pkg-config files 2012-05-29 10:09:59 -04:00
wayland-server.c wayland-server: Fix style on multi-line comment 2015-06-12 15:35:13 -07:00
wayland-server.h src: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-12 15:31:24 -07:00
wayland-server.pc.in Export the Wayland protocol XML file 2013-09-21 21:48:56 -07:00
wayland-shm.c src: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-12 15:31:24 -07:00
wayland-util.c src: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-12 15:31:24 -07:00
wayland-util.h src: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-12 15:31:24 -07:00
wayland-version.h.in src: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-12 15:31:24 -07:00