You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
73 lines
2.1 KiB
73 lines
2.1 KiB
From 8ceba27d6291f1195e13608033ec439aec621fc6 Mon Sep 17 00:00:00 2001
|
|
From: Ethan Lee <flibitijibibo@gmail.com>
|
|
Date: Sat, 17 Apr 2021 12:07:38 -0400
|
|
Subject: [PATCH] video: Prefer Wayland over X11
|
|
|
|
---
|
|
src/video/SDL_video.c | 24 ++++++++++++------------
|
|
1 file changed, 12 insertions(+), 12 deletions(-)
|
|
|
|
diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
|
|
index dac8d1cc9..d3fe65502 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
|
|
--
|
|
2.34.1
|
|
|