How to tell if rendering/accessing SDL_Renderer is safe on Android / bogus minmize/background event in side by side?


On Android in side-by-side mode, I get window minimized and app into background events.

This would normally indicate that 1. the app is not visible anymore (so rendering is pointless), 2. the OpenGL context/SDL_Renderer is not safe to touch in any way without causing corruption (as I have been informed in ).

I’m pretty sure NONE of these two things are true for side by side, since other apps when not focused in side by side render & update just fine, so both drawing and using the OpenGL context works for them.

Is this an SDL2 bug? Why would it tell me the app is in background, and the window is minimized(!) when it’s jut a simple window focus loss and the app isn’t truly in background? Because this really is a bit of an issue for side by side


After more thinking I can’t come up with any good reason why just from a pure API user point of view this would make any sense, so I filed a bug:

(I may have missed something though, so I’m curious about responses)


Try this


@rmg.nik check out the ticket, it’s a known issue apparently. Also the window is not ACTUALLY minimized, and the problem isn’t the minimize event per se but the background one and that I can’t redraw afterwards.