Skip to content

Commit 254fcc9

Browse files
committed
Revert "video: Prefer Wayland over X11"
This reverts commit 8ceba27. SDL Wayland support is stable, but there are a number of issues with third-party software (NVIDIA drivers, libwayland event overflow, libdecor not handling plugin load failures, Steam overlay not working with Wayland, etc.) that make it better to default to X11 at this time. Games which would like to prefer wayland when available can use the following code before SDL_Init(): SDL_SetHint(SDL_HINT_VIDEODRIVER, "wayland,x11"); Fixes #5527
1 parent c1336b2 commit 254fcc9

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
@@ -61,12 +61,12 @@ static VideoBootStrap *bootstrap[] = {
6161
#if SDL_VIDEO_DRIVER_COCOA
6262
&COCOA_bootstrap,
6363
#endif
64-
#if SDL_VIDEO_DRIVER_WAYLAND
65-
&Wayland_bootstrap,
66-
#endif
6764
#if SDL_VIDEO_DRIVER_X11
6865
&X11_bootstrap,
6966
#endif
67+
#if SDL_VIDEO_DRIVER_WAYLAND
68+
&Wayland_bootstrap,
69+
#endif
7070
#if SDL_VIDEO_DRIVER_VIVANTE
7171
&VIVANTE_bootstrap,
7272
#endif
@@ -4271,12 +4271,12 @@ SDL_IsScreenKeyboardShown(SDL_Window *window)
42714271
#if SDL_VIDEO_DRIVER_UIKIT
42724272
#include "uikit/SDL_uikitmessagebox.h"
42734273
#endif
4274-
#if SDL_VIDEO_DRIVER_WAYLAND
4275-
#include "wayland/SDL_waylandmessagebox.h"
4276-
#endif
42774274
#if SDL_VIDEO_DRIVER_X11
42784275
#include "x11/SDL_x11messagebox.h"
42794276
#endif
4277+
#if SDL_VIDEO_DRIVER_WAYLAND
4278+
#include "wayland/SDL_waylandmessagebox.h"
4279+
#endif
42804280
#if SDL_VIDEO_DRIVER_HAIKU
42814281
#include "haiku/SDL_bmessagebox.h"
42824282
#endif
@@ -4384,17 +4384,17 @@ SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
43844384
retval = 0;
43854385
}
43864386
#endif
4387-
#if SDL_VIDEO_DRIVER_WAYLAND
4387+
#if SDL_VIDEO_DRIVER_X11
43884388
if (retval == -1 &&
4389-
SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_WAYLAND) &&
4390-
Wayland_ShowMessageBox(messageboxdata, buttonid) == 0) {
4389+
SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_X11) &&
4390+
X11_ShowMessageBox(messageboxdata, buttonid) == 0) {
43914391
retval = 0;
43924392
}
43934393
#endif
4394-
#if SDL_VIDEO_DRIVER_X11
4394+
#if SDL_VIDEO_DRIVER_WAYLAND
43954395
if (retval == -1 &&
4396-
SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_X11) &&
4397-
X11_ShowMessageBox(messageboxdata, buttonid) == 0) {
4396+
SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_WAYLAND) &&
4397+
Wayland_ShowMessageBox(messageboxdata, buttonid) == 0) {
43984398
retval = 0;
43994399
}
44004400
#endif

0 commit comments

Comments
 (0)