devkitPro / SDL

Simple Directmedia Layer
https://libsdl.org
zlib License
11 stars 12 forks source link

Switch: SDL_WINDOWEVENT_RESIZED not sent after SDL_WINDOWEVENT_SIZE_CHANGED when console is docked/undocked #31

Open p-sam opened 9 months ago

p-sam commented 9 months ago

Windows with the SDL_WINDOW_RESIZABLE flag get resized whenever operationMode changes (roughly when the console is docked or undocked), but since that change is external (= the user did not call SDL_SetWindowSize), a corresponding SDL_WINDOWEVENT_RESIZED event should be sent when that happens.

Relevant part in the SDL2 docs from https://wiki.libsdl.org/SDL2/SDL_WindowEventID

window size has changed, either as a result of an API call or through the system or user changing the window size; this event is followed by SDL_WINDOWEVENT_RESIZED if the size was changed by an external event, i.e. the user or the window manager