How does WIN_SetWindowResizable() work?

I’ve been reading the code of

WIN_SetWindowResizable(_THIS, SDL_Window * window, SDL_bool resizable)
    SDL_WindowData *data = (SDL_WindowData *)window->driverdata;
    HWND hwnd = data->hwnd;
    DWORD style;

    style = GetWindowLong(hwnd, GWL_STYLE);
    style &= ~STYLE_MASK;
    style |= GetWindowStyle(window);

    SetWindowLong(hwnd, GWL_STYLE, style);

Maybe I’m missing something but it looks like resizable is not being used

Indeed it is not used here, but it is used in the parent function (in SDL_video.c) where it affects the SDL_WINDOW_RESIZABLE flag. This flag is tested in GetWindowStyle().

1 Like