2021-08-11 18:05:51 +02:00
|
|
|
From ae7ee2a59c8d41d67c6bc80f25b6e52670dddbbf Mon Sep 17 00:00:00 2001
|
|
|
|
From: Ethan Lee <flibitijibibo@gmail.com>
|
|
|
|
Date: Wed, 11 Aug 2021 09:59:43 -0400
|
|
|
|
References: https://github.com/libsdl-org/SDL/pull/4629
|
|
|
|
Subject: [PATCH] wayland: Ignore stateless/sizeless configs when starting in
|
|
|
|
fullscreen mode
|
|
|
|
|
|
|
|
---
|
2021-08-11 18:09:53 +02:00
|
|
|
src/video/wayland/SDL_waylandwindow.c | 10 ++++++++--
|
2021-08-11 18:05:51 +02:00
|
|
|
1 file changed, 8 insertions(+), 2 deletions(-)
|
|
|
|
|
2021-08-11 18:09:53 +02:00
|
|
|
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
|
2021-08-11 17:43:02 +02:00
|
|
|
|
|
|
|
/* Foolishly do what the compositor says here. If it's wrong, don't
|
|
|
|
* blame us, we were explicitly instructed to do this.
|
2021-08-11 18:05:51 +02:00
|
|
|
+ *
|
2021-08-11 17:43:02 +02:00
|
|
|
+ * 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) {
|