summaryrefslogtreecommitdiffstats
path: root/video/out/gl_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/gl_common.c')
-rw-r--r--video/out/gl_common.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/video/out/gl_common.c b/video/out/gl_common.c
index 48b1089147..3830f237f8 100644
--- a/video/out/gl_common.c
+++ b/video/out/gl_common.c
@@ -858,12 +858,14 @@ static struct backend backends[] = {
#ifdef CONFIG_GL_WIN32
{"win", mpgl_set_backend_w32},
#endif
-#ifdef CONFIG_GL_X11
- {"x11", mpgl_set_backend_x11},
-#endif
+
+//Add the wayland backend before x11, in order to probe for a wayland-server before a x11-server and avoid using xwayland
#ifdef CONFIG_GL_WAYLAND
{"wayland", mpgl_set_backend_wayland},
#endif
+#ifdef CONFIG_GL_X11
+ {"x11", mpgl_set_backend_x11},
+#endif
{0}
};