Преглед изворни кода

wayland: Only apply the toplevel bounds when initially mapping the window

The size shouldn't be clamped to the bounds after the window is mapped, or an explicitly requested user size may be overwritten.
Frank Praznik пре 8 месеци
родитељ
комит
ba1a980535
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      src/video/wayland/SDL_waylandwindow.c

+ 2 - 1
src/video/wayland/SDL_waylandwindow.c

@@ -835,7 +835,8 @@ static void handle_configure_xdg_toplevel(void *data,
                     height = window->floating.h;
                     height = window->floating.h;
 
 
                     // Clamp the window to the toplevel bounds, if any are set.
                     // Clamp the window to the toplevel bounds, if any are set.
-                    if (wind->toplevel_bounds.width && wind->toplevel_bounds.height) {
+                    if (wind->shell_surface_status == WAYLAND_SHELL_SURFACE_STATUS_WAITING_FOR_CONFIGURE &&
+                        wind->toplevel_bounds.width && wind->toplevel_bounds.height) {
                         width = SDL_min(wind->toplevel_bounds.width, width);
                         width = SDL_min(wind->toplevel_bounds.width, width);
                         height = SDL_min(wind->toplevel_bounds.height, height);
                         height = SDL_min(wind->toplevel_bounds.height, height);
                     }
                     }