wayland: Only apply the toplevel bounds to resizable windows

(cherry picked from commit 0efeb82a28)
This commit is contained in:
Frank Praznik authored and Sam Lantinga committed 2025-01-14 12:10:05 -08:00
1 parent 66ce42b7d2
commit b895741422
1 file changed
+2 -2
+2 -2
View File
@@ -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);