Просмотр исходного кода

wayland: Fix maximized check when setting the window size

The logical || made the flag mask evaluate to 1, so only fullscreen was checked and maximized windows were treated as resizable.
svncibrahim 2 месяцев назад
Родитель
Сommit
eba97448ae
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/video/wayland/SDL_waylandwindow.c

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

@@ -3296,7 +3296,7 @@ void Wayland_SetWindowSize(SDL_VideoDevice *_this, SDL_Window *window)
      */
     FlushPendingEvents(window);
 
-    const bool resizable_state = !(window->flags & (SDL_WINDOW_MAXIMIZED || SDL_WINDOW_FULLSCREEN));
+    const bool resizable_state = !(window->flags & (SDL_WINDOW_MAXIMIZED | SDL_WINDOW_FULLSCREEN));
 
     /* Maximized and fullscreen windows don't get resized, and the new size is ignored
      * if this is just to recalculate the min/max or aspect limits on a tiled window.