瀏覽代碼

wayland: Ensure that the maximum libdecor frame size limit is above the required minimum

Both the minimum and maximum libdecor frame size limits must meet or exceed the required minimum size, or the libdecor plugins can error and/or crash.
Frank Praznik 2 年之前
父節點
當前提交
813e7c3992
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/video/wayland/SDL_waylandwindow.c

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

@@ -191,8 +191,8 @@ static void SetMinMaxDimensions(SDL_Window *window)
     } else if (window->flags & SDL_WINDOW_RESIZABLE) {
     } else if (window->flags & SDL_WINDOW_RESIZABLE) {
         min_width = SDL_max(window->min_w, wind->system_min_required_width);
         min_width = SDL_max(window->min_w, wind->system_min_required_width);
         min_height = SDL_max(window->min_h, wind->system_min_required_height);
         min_height = SDL_max(window->min_h, wind->system_min_required_height);
-        max_width = window->max_w;
-        max_height = window->max_h;
+        max_width = SDL_max(window->max_w, wind->system_min_required_width);
+        max_height = SDL_max(window->max_h, wind->system_min_required_height);
     } else {
     } else {
         min_width = wind->wl_window_width;
         min_width = wind->wl_window_width;
         min_height = wind->wl_window_height;
         min_height = wind->wl_window_height;