Explorar o código

wayland: Don't try to restore non-resizable windows

Libdecor can crash if attempting to un-maximize a window that was not set as resizable.
Frank Praznik %!s(int64=3) %!d(string=hai) anos
pai
achega
e35c3872dc
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      src/video/wayland/SDL_waylandwindow.c

+ 4 - 0
src/video/wayland/SDL_waylandwindow.c

@@ -1699,6 +1699,10 @@ void Wayland_RestoreWindow(_THIS, SDL_Window *window)
         return;
     }
 
+    if (!(window->flags & SDL_WINDOW_RESIZABLE)) {
+            return;
+    }
+
     /* Set this flag now even if we never actually maximized, eventually
      * ShowWindow will take care of it along with the other window state.
      */