From b8957414223dc85633cb180e96949cf4bad52ffd Mon Sep 17 00:00:00 2001 From: Frank Praznik Date: Mon, 6 Jan 2025 17:19:44 -0500 Subject: [PATCH] wayland: Only apply the toplevel bounds to resizable windows (cherry picked from commit 0efeb82a28795e72594642251f1bddcb881aaa7f) --- 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 06cd1b5a65..13b93c6563 100644 --- a/src/video/wayland/SDL_waylandwindow.c +++ b/src/video/wayland/SDL_waylandwindow.c @@ -537,8 +537,8 @@ static void handle_configure_xdg_toplevel(void *data, width = wind->floating_width; height = wind->floating_height; - /* Clamp the window to the toplevel bounds, if any were sent. */ - if ((window->flags & SDL_WINDOW_HIDDEN) && + /* Clamp resizable windows to the toplevel bounds when mapping, if any were sent. */ + if ((window->flags & (SDL_WINDOW_HIDDEN | SDL_WINDOW_RESIZABLE)) && wind->toplevel_bounds_width && wind->toplevel_bounds_height) { width = SDL_min(width, wind->toplevel_bounds_width); height = SDL_min(height, wind->toplevel_bounds_height);