video: Prefer Wayland over X11
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index dac8d1c..d3fe655 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -61,12 +61,12 @@ static VideoBootStrap *bootstrap[] = {
#if SDL_VIDEO_DRIVER_COCOA
&COCOA_bootstrap,
#endif
-#if SDL_VIDEO_DRIVER_X11
- &X11_bootstrap,
-#endif
#if SDL_VIDEO_DRIVER_WAYLAND
&Wayland_bootstrap,
#endif
+#if SDL_VIDEO_DRIVER_X11
+ &X11_bootstrap,
+#endif
#if SDL_VIDEO_DRIVER_VIVANTE
&VIVANTE_bootstrap,
#endif
@@ -4249,12 +4249,12 @@ SDL_IsScreenKeyboardShown(SDL_Window *window)
#if SDL_VIDEO_DRIVER_UIKIT
#include "uikit/SDL_uikitmessagebox.h"
#endif
-#if SDL_VIDEO_DRIVER_X11
-#include "x11/SDL_x11messagebox.h"
-#endif
#if SDL_VIDEO_DRIVER_WAYLAND
#include "wayland/SDL_waylandmessagebox.h"
#endif
+#if SDL_VIDEO_DRIVER_X11
+#include "x11/SDL_x11messagebox.h"
+#endif
#if SDL_VIDEO_DRIVER_HAIKU
#include "haiku/SDL_bmessagebox.h"
#endif
@@ -4362,17 +4362,17 @@ SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
retval = 0;
}
#endif
-#if SDL_VIDEO_DRIVER_X11
+#if SDL_VIDEO_DRIVER_WAYLAND
if (retval == -1 &&
- SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_X11) &&
- X11_ShowMessageBox(messageboxdata, buttonid) == 0) {
+ SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_WAYLAND) &&
+ Wayland_ShowMessageBox(messageboxdata, buttonid) == 0) {
retval = 0;
}
#endif
-#if SDL_VIDEO_DRIVER_WAYLAND
+#if SDL_VIDEO_DRIVER_X11
if (retval == -1 &&
- SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_WAYLAND) &&
- Wayland_ShowMessageBox(messageboxdata, buttonid) == 0) {
+ SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_X11) &&
+ X11_ShowMessageBox(messageboxdata, buttonid) == 0) {
retval = 0;
}
#endif