clutter: Prefer the X11 backend to the Wayland one

If clutter is built with both X11 and Wayland support, prefer the
(more complete for now) X11 backend. This matches GTK+'s current
ordering.

This allows distributions to ship a clutter version with both backends
built, and using an envvar to switch to the wayland backend and test
applications.

In the future, applications would be able to choose which backend
they prefer and in which order.

https://bugzilla.gnome.org/show_bug.cgi?id=695838
This commit is contained in:
Bastien Nocera 2013-03-14 12:31:52 +01:00
parent 73dbd17948
commit bbb54f1aed

View File

@ -1409,6 +1409,11 @@ clutter_create_backend (void)
retval = g_object_new (CLUTTER_TYPE_BACKEND_WIN32, NULL);
else
#endif
#ifdef CLUTTER_WINDOWING_X11
if (backend == NULL || backend == I_(CLUTTER_WINDOWING_X11))
retval = g_object_new (CLUTTER_TYPE_BACKEND_X11, NULL);
else
#endif
#ifdef CLUTTER_WINDOWING_WAYLAND
if (backend == NULL || backend == I_(CLUTTER_WINDOWING_WAYLAND))
retval = g_object_new (CLUTTER_TYPE_BACKEND_WAYLAND, NULL);
@ -1419,11 +1424,6 @@ clutter_create_backend (void)
retval = g_object_new (CLUTTER_TYPE_BACKEND_EGL_NATIVE, NULL);
else
#endif
#ifdef CLUTTER_WINDOWING_X11
if (backend == NULL || backend == I_(CLUTTER_WINDOWING_X11))
retval = g_object_new (CLUTTER_TYPE_BACKEND_X11, NULL);
else
#endif
#ifdef CLUTTER_WINDOWING_GDK
if (backend == NULL || backend == I_(CLUTTER_WINDOWING_GDK))
retval = g_object_new (CLUTTER_TYPE_BACKEND_GDK, NULL);