The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Black screen after restoring minimized window
Singular_One


Joined: 21 Feb 2015
Posts: 1
Hello there, I am new to SDL and have limited experience with graphics, apart from some openGL I learned at my university, so please excuse my inexperience.
I have the following problem:

When I maximize my program's window and then minimize it, restoring the window will result in a completely black screen. Un-maximizing the window will render correctly again.
The problem does not occur when the window is not maximized, minimizing and restoring works fine.I am using renderers, and i have tried a few things related to window events but have not found a solution yet..
I am under Windows 7 64-bit.

Is there something obvious I am missing?
Raith


Joined: 06 Jul 2013
Posts: 2
Necro posting or not, but I have the same issue and I do not understand why does a maximized window when minimized to the taskbar and then restored again to it's maximized state from taskbar appears black with nothing rendered?

Any other actions (except, minimizing to taskbar and restoring from taskbar) restore the screen to normal, not to mention that SDL_GetError produces absolutely nothing during the time I see the black screen.
Re: Black screen after restoring minimized window
DLudwig


Joined: 09 Feb 2012
Posts: 179
Singular_One wrote:
When I maximize my program's window and then minimize it, restoring the window will result in a completely black screen. Un-maximizing the window will render correctly again.
The problem does not occur when the window is not maximized, minimizing and restoring works fine.I am using renderers, and i have tried a few things related to window events but have not found a solution yet..
I am under Windows 7 64-bit.


What version of SDL are you using?

-- David L.
Re: Black screen after restoring minimized window
DLudwig


Joined: 09 Feb 2012
Posts: 179
... For context, I fixed an SDL bug similar to this. The fix made it into SDL 2.0.4. I'm wondering if an SDL update might fix this, for you.

Cheers!
-- David L.
Re: Black screen after restoring minimized window
Raith


Joined: 06 Jul 2013
Posts: 2
DLudwig wrote:
... For context, I fixed an SDL bug similar to this. The fix made it into SDL 2.0.4. I'm wondering if an SDL update might fix this, for you.

Cheers!
-- David L.


Indeed, a fresh re-download of the binaries made this issue go away. I was still using 2.0.3 mistakenly thinking that I already had updated to 2.0.4, now that's on me... Thank you!