Commit 33a46dd5 authored by Benjamin Otte's avatar Benjamin Otte

gdk: Select the X11 backend a the last possible backend

On Windows and OS X we want to prefer the native backends over the X11
backend.
On Linux, nothing changes as nobody is going to enable those backends
(and if they do, they'll know what they get).
parent 9f5c734e
......@@ -225,11 +225,6 @@ gdk_display_manager_get (void)
const gchar *backend;
backend = g_getenv ("GDK_BACKEND");
#ifdef GDK_WINDOWING_X11
if (backend == NULL || strcmp (backend, "x11") == 0)
manager = g_object_new (gdk_x11_display_manager_get_type (), NULL);
else
#endif
#ifdef GDK_WINDOWING_QUARTZ
if (backend == NULL || strcmp (backend, "quartz") == 0)
manager = g_object_new (gdk_quartz_display_manager_get_type (), NULL);
......@@ -239,6 +234,11 @@ gdk_display_manager_get (void)
if (backend == NULL || strcmp (backend, "win32") == 0)
manager = g_object_new (gdk_win32_display_manager_get_type (), NULL);
else
#endif
#ifdef GDK_WINDOWING_X11
if (backend == NULL || strcmp (backend, "x11") == 0)
manager = g_object_new (gdk_x11_display_manager_get_type (), NULL);
else
#endif
if (backend != NULL)
g_error ("Unsupported GDK backend: %s", backend);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment