From 71ca4d1cc684c0574a572df3528cc3783f2b222d19280546849376fb361b6005 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 11 Aug 2021 15:43:02 +0000 Subject: [PATCH] Accepting request 911466 from home:dlshcbmuipmam:branches:games - sdl2-fix-wayland-fullscreen.patch * fix wayland issue for wlroot, see https://github.com/libsdl-org/SDL/pull/4629 OBS-URL: https://build.opensuse.org/request/show/911466 OBS-URL: https://build.opensuse.org/package/show/games/SDL2?expand=0&rev=108 --- SDL2.changes | 6 ++++++ SDL2.spec | 1 + sdl2-fix-wayland-fullscreen.patch | 22 ++++++++++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 sdl2-fix-wayland-fullscreen.patch diff --git a/SDL2.changes b/SDL2.changes index 9a7d5c0..ef95700 100644 --- a/SDL2.changes +++ b/SDL2.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Aug 11 15:31:36 UTC 2021 - kh Lai + +- sdl2-fix-wayland-fullscreen.patch + * fix wayland issue for wlroot, see https://github.com/libsdl-org/SDL/pull/4629 + ------------------------------------------------------------------- Wed Aug 11 10:12:03 UTC 2021 - Jan Engelhardt diff --git a/SDL2.spec b/SDL2.spec index 801ab53..15104d9 100644 --- a/SDL2.spec +++ b/SDL2.spec @@ -33,6 +33,7 @@ Source4: baselibs.conf Patch1: sdl2-symvers.patch Patch2: SDL2-endian.patch Patch3: sdl2-khronos.patch +Patch4: sdl2-fix-wayland-fullscreen.patch BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: nasm diff --git a/sdl2-fix-wayland-fullscreen.patch b/sdl2-fix-wayland-fullscreen.patch new file mode 100644 index 0000000..7f1a3f3 --- /dev/null +++ b/sdl2-fix-wayland-fullscreen.patch @@ -0,0 +1,22 @@ +Index: SDL2-2.0.16/src/video/wayland/SDL_waylandwindow.c +=================================================================== +--- SDL2-2.0.16.orig/src/video/wayland/SDL_waylandwindow.c ++++ SDL2-2.0.16/src/video/wayland/SDL_waylandwindow.c +@@ -219,9 +219,15 @@ handle_configure_xdg_toplevel(void *data + + /* Foolishly do what the compositor says here. If it's wrong, don't + * blame us, we were explicitly instructed to do this. ++ * * ++ * UPDATE: Nope, we can't actually do that, the compositor may give ++ * us a completely stateless, sizeless configure, with which we have ++ * to enforce our own state anyway. + */ +- window->w = width; +- window->h = height; ++ if (width != 0 && height != 0) { ++ window->w = width; ++ window->h = height; ++ } + + /* This part is good though. */ + if (window->flags & SDL_WINDOW_ALLOW_HIGHDPI) {