From f9f7db4e086036bd8ef3bce0f303e9057ee63040 Mon Sep 17 00:00:00 2001 From: Ethan Lee Date: Sun, 9 Oct 2022 12:28:43 -0400 Subject: [PATCH] video: Prefer Wayland over X11 (take 2!) --- src/video/SDL_video.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index 0aa44c2577..c201977179 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -67,12 +67,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 @@ -4439,12 +4439,12 @@ SDL_GetMessageBoxCount(void) #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 @@ -4548,13 +4548,6 @@ SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) retval = 0; } #endif -#if SDL_VIDEO_DRIVER_X11 - if (retval == -1 && - SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_X11) && - X11_ShowMessageBox(messageboxdata, buttonid) == 0) { - retval = 0; - } -#endif #if SDL_VIDEO_DRIVER_WAYLAND if (retval == -1 && SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_WAYLAND) && @@ -4562,6 +4555,13 @@ SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) retval = 0; } #endif +#if SDL_VIDEO_DRIVER_X11 + if (retval == -1 && + SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_X11) && + X11_ShowMessageBox(messageboxdata, buttonid) == 0) { + retval = 0; + } +#endif #if SDL_VIDEO_DRIVER_HAIKU if (retval == -1 && SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_HAIKU) &&