x11: Use the floating size for the constraints on non-resizable windows

Otherwise, the window manager can think that the window is larger than it is and try to reposition it.
This commit is contained in:
Frank Praznik
2024-05-29 17:01:51 -04:00
committed by Sam Lantinga
parent 384e5486bc
commit 63c164f778

View File

@@ -668,8 +668,8 @@ int X11_CreateWindow(SDL_VideoDevice *_this, SDL_Window *window, SDL_PropertiesI
/* Setup the normal size hints */
sizehints->flags = 0;
if (!(window->flags & SDL_WINDOW_RESIZABLE)) {
sizehints->min_width = sizehints->max_width = window->w;
sizehints->min_height = sizehints->max_height = window->h;
sizehints->min_width = sizehints->max_width = window->floating.w;
sizehints->min_height = sizehints->max_height = window->floating.h;
sizehints->flags |= (PMaxSize | PMinSize);
}
if (!undefined_position) {