From 63c164f778b63e2e09a700ac6adde19028c34314 Mon Sep 17 00:00:00 2001 From: Frank Praznik Date: Wed, 29 May 2024 17:01:51 -0400 Subject: [PATCH] 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. --- src/video/x11/SDL_x11window.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video/x11/SDL_x11window.c b/src/video/x11/SDL_x11window.c index 02737c6480..3cfd2782dc 100644 --- a/src/video/x11/SDL_x11window.c +++ b/src/video/x11/SDL_x11window.c @@ -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) {