diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index 1673666c0..cf62e782e 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_WAYLAND - &Wayland_bootstrap, -#endif #if SDL_VIDEO_DRIVER_X11 &X11_bootstrap, #endif +#if SDL_VIDEO_DRIVER_WAYLAND + &Wayland_bootstrap, +#endif #if SDL_VIDEO_DRIVER_VIVANTE &VIVANTE_bootstrap, #endif @@ -4271,12 +4271,12 @@ SDL_IsScreenKeyboardShown(SDL_Window *window) #if SDL_VIDEO_DRIVER_UIKIT #include "uikit/SDL_uikitmessagebox.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_WAYLAND +#include "wayland/SDL_waylandmessagebox.h" +#endif #if SDL_VIDEO_DRIVER_HAIKU #include "haiku/SDL_bmessagebox.h" #endif @@ -4384,13 +4384,6 @@ SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) retval = 0; } #endif -#if SDL_VIDEO_DRIVER_WAYLAND - if (retval == -1 && - SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_WAYLAND) && - Wayland_ShowMessageBox(messageboxdata, buttonid) == 0) { - retval = 0; - } -#endif #if SDL_VIDEO_DRIVER_X11 if (retval == -1 && SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_X11) && @@ -4398,6 +4391,13 @@ SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) retval = 0; } #endif +#if SDL_VIDEO_DRIVER_WAYLAND + if (retval == -1 && + SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_WAYLAND) && + Wayland_ShowMessageBox(messageboxdata, buttonid) == 0) { + retval = 0; + } +#endif #if SDL_VIDEO_DRIVER_HAIKU if (retval == -1 && SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_HAIKU) &&