Skip to content

Commit f9f7db4

Browse files
committed
video: Prefer Wayland over X11 (take 2!)
1 parent 6d2b74d commit f9f7db4

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/video/SDL_video.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ static VideoBootStrap *bootstrap[] = {
6767
#if SDL_VIDEO_DRIVER_COCOA
6868
&COCOA_bootstrap,
6969
#endif
70-
#if SDL_VIDEO_DRIVER_X11
71-
&X11_bootstrap,
72-
#endif
7370
#if SDL_VIDEO_DRIVER_WAYLAND
7471
&Wayland_bootstrap,
7572
#endif
73+
#if SDL_VIDEO_DRIVER_X11
74+
&X11_bootstrap,
75+
#endif
7676
#if SDL_VIDEO_DRIVER_VIVANTE
7777
&VIVANTE_bootstrap,
7878
#endif
@@ -4439,12 +4439,12 @@ SDL_GetMessageBoxCount(void)
44394439
#if SDL_VIDEO_DRIVER_UIKIT
44404440
#include "uikit/SDL_uikitmessagebox.h"
44414441
#endif
4442-
#if SDL_VIDEO_DRIVER_X11
4443-
#include "x11/SDL_x11messagebox.h"
4444-
#endif
44454442
#if SDL_VIDEO_DRIVER_WAYLAND
44464443
#include "wayland/SDL_waylandmessagebox.h"
44474444
#endif
4445+
#if SDL_VIDEO_DRIVER_X11
4446+
#include "x11/SDL_x11messagebox.h"
4447+
#endif
44484448
#if SDL_VIDEO_DRIVER_HAIKU
44494449
#include "haiku/SDL_bmessagebox.h"
44504450
#endif
@@ -4548,17 +4548,17 @@ SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
45484548
retval = 0;
45494549
}
45504550
#endif
4551-
#if SDL_VIDEO_DRIVER_X11
4551+
#if SDL_VIDEO_DRIVER_WAYLAND
45524552
if (retval == -1 &&
4553-
SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_X11) &&
4554-
X11_ShowMessageBox(messageboxdata, buttonid) == 0) {
4553+
SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_WAYLAND) &&
4554+
Wayland_ShowMessageBox(messageboxdata, buttonid) == 0) {
45554555
retval = 0;
45564556
}
45574557
#endif
4558-
#if SDL_VIDEO_DRIVER_WAYLAND
4558+
#if SDL_VIDEO_DRIVER_X11
45594559
if (retval == -1 &&
4560-
SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_WAYLAND) &&
4561-
Wayland_ShowMessageBox(messageboxdata, buttonid) == 0) {
4560+
SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_X11) &&
4561+
X11_ShowMessageBox(messageboxdata, buttonid) == 0) {
45624562
retval = 0;
45634563
}
45644564
#endif

0 commit comments

Comments
 (0)