summaryrefslogtreecommitdiff
path: root/SDL2-2.0.22-prefer-wayland.patch
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-06-07 06:49:46 +0000
committerCoprDistGit <infra@openeuler.org>2023-06-07 06:49:46 +0000
commit4d4d3e216827dfa8e6094328683c3215300c70dd (patch)
treec63fe70baedba2d59864c3bde506799ba2dd00a5 /SDL2-2.0.22-prefer-wayland.patch
parentbe8d2b8fac2389f12e8e090d86841acb7ea09a6e (diff)
automatic import of SDL2
Diffstat (limited to 'SDL2-2.0.22-prefer-wayland.patch')
-rw-r--r--SDL2-2.0.22-prefer-wayland.patch80
1 files changed, 80 insertions, 0 deletions
diff --git a/SDL2-2.0.22-prefer-wayland.patch b/SDL2-2.0.22-prefer-wayland.patch
new file mode 100644
index 0000000..f8586e0
--- /dev/null
+++ b/SDL2-2.0.22-prefer-wayland.patch
@@ -0,0 +1,80 @@
+From 68d8a2c6b4f732920df40bd79dc3c18b71a4a349 Mon Sep 17 00:00:00 2001
+From: Neal Gompa <ngompa@fedoraproject.org>
+Date: Fri, 29 Apr 2022 23:39:39 -0400
+Subject: [PATCH] Revert "Revert "video: Prefer Wayland over X11""
+
+For Fedora/RHEL, we want to continue using Wayland by default.
+
+The majority of issues around Wayland by default seem to center
+around cases that are issues for the Steam Runtime's bundled
+copy of SDL and proprietary games that depend on that runtime.
+
+These issues do not apply to us.
+
+This reverts commit 254fcc90eb22bb159ab365ad956222a9c5632841.
+---
+ 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 2b896c44b..6f31f4c9e 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
+@@ -4275,12 +4275,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
+@@ -4388,17 +4388,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.35.1