Tested with current main (SDL3), but may also be present on SDL2.
Consider the source at the bottom of this post that switches the window between full screen and windowed mode every second.
When creating the SDL_Window with flags == 0, I expect SDL_MaximizeWindow and SDL_RestoreWindow to be no-ops because SDL_WINDOW_RESIZABLE has not been used.
Instead, the window resizes and the SDL_Renderer fills the screen unpredictable: sometimes it fills the window, sometimes only a small part, and sometimes with something corrupted.
When creating the window with SDL_WINDOW_RESIZABLE, the renderer often does not completely fill the window, or shows a corrupted image.
When using SDL_WINDOW_BORDERLESS, the window also resizes where it shouldn't. The renderer correctly small rectangles, but these are often somewhat offset, and not correct.
Common in all issues, is that SDL_RestoreWindow loses the position of the window.
After a few iterations, it ends up in the top left location, without the title bar visible.
I expect it to be restored in a similar location before SDL_MaximizeWindow.
Tested with current main (SDL3), but may also be present on SDL2.
Consider the source at the bottom of this post that switches the window between full screen and windowed mode every second.
SDL_Window
with flags == 0, I expectSDL_MaximizeWindow
andSDL_RestoreWindow
to be no-ops becauseSDL_WINDOW_RESIZABLE
has not been used. Instead, the window resizes and theSDL_Renderer
fills the screen unpredictable: sometimes it fills the window, sometimes only a small part, and sometimes with something corrupted.SDL_WINDOW_RESIZABLE
, the renderer often does not completely fill the window, or shows a corrupted image.SDL_WINDOW_BORDERLESS
, the window also resizes where it shouldn't. The renderer correctly small rectangles, but these are often somewhat offset, and not correct.Common in all issues, is that
SDL_RestoreWindow
loses the position of the window. After a few iterations, it ends up in the top left location, without the title bar visible. I expect it to be restored in a similar location beforeSDL_MaximizeWindow
.