From 96720f335002bef62115e39327940df454d78f6c Mon Sep 17 00:00:00 2001
From: Frank Praznik <[EMAIL REDACTED]>
Date: Sat, 22 Jul 2023 11:42:23 -0400
Subject: [PATCH] wayland: Don't clamp the max window size when unbounded
---
src/video/wayland/SDL_waylandwindow.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/video/wayland/SDL_waylandwindow.c b/src/video/wayland/SDL_waylandwindow.c
index 6a48a7e2a4be..58650e651e63 100644
--- a/src/video/wayland/SDL_waylandwindow.c
+++ b/src/video/wayland/SDL_waylandwindow.c
@@ -191,8 +191,8 @@ static void SetMinMaxDimensions(SDL_Window *window)
} else if (window->flags & SDL_WINDOW_RESIZABLE) {
min_width = SDL_max(window->min_w, wind->system_min_required_width);
min_height = SDL_max(window->min_h, wind->system_min_required_height);
- max_width = SDL_max(window->max_w, wind->system_min_required_width);
- max_height = SDL_max(window->max_h, wind->system_min_required_height);
+ max_width = window->max_w ? SDL_max(window->max_w, wind->system_min_required_width) : 0;
+ max_height = window->max_h ? SDL_max(window->max_h, wind->system_min_required_height) : 0;
} else {
min_width = wind->wl_window_width;
min_height = wind->wl_window_height;