]> git.pld-linux.org Git - packages/SDL2.git/blame - wayland-sizeless-config.patch
upstream patch for fixing crash with wayland driver; rel 2
[packages/SDL2.git] / wayland-sizeless-config.patch
CommitLineData
6277c5e0
JP
1From 63285c2562ba05e5bd113e7aaa003d1eeeec52d9 Mon Sep 17 00:00:00 2001
2From: Ethan Lee <flibitijibibo@gmail.com>
3Date: Wed, 11 Aug 2021 09:59:43 -0400
4Subject: [PATCH] wayland: Ignore stateless/sizeless configs when starting in
5 fullscreen mode
6
7---
8 src/video/wayland/SDL_waylandwindow.c | 10 ++++++++--
9 1 file changed, 8 insertions(+), 2 deletions(-)
10
11diff --git a/src/video/wayland/SDL_waylandwindow.c b/src/video/wayland/SDL_waylandwindow.c
12index 025dd30eeb..451d33b767 100644
13--- a/src/video/wayland/SDL_waylandwindow.c
14+++ b/src/video/wayland/SDL_waylandwindow.c
15@@ -219,9 +219,15 @@ handle_configure_xdg_toplevel(void *data,
16
17 /* Foolishly do what the compositor says here. If it's wrong, don't
18 * blame us, we were explicitly instructed to do this.
19+ *
20+ * UPDATE: Nope, we can't actually do that, the compositor may give
21+ * us a completely stateless, sizeless configure, with which we have
22+ * to enforce our own state anyway.
23 */
24- window->w = width;
25- window->h = height;
26+ if (width != 0 && height != 0) {
27+ window->w = width;
28+ window->h = height;
29+ }
30
31 /* This part is good though. */
32 if (window->flags & SDL_WINDOW_ALLOW_HIGHDPI) {
This page took 0.137085 seconds and 4 git commands to generate.