Browse Source

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.
Frank Praznik 1 year ago
parent
commit
63c164f778
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/video/x11/SDL_x11window.c

+ 2 - 2
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) {