Refresh trouble with SDL_WINDOWEVENT_EXPOSED

Hey guys,

I am experiencing some window refresh trouble. In particular, redrawing
the whole shebang on SDL_WINDOWEVENT_EXPOSED does not seem sufficient.

I am attaching a very small example that shows that on Windows 7 and SDL 2.0.3
redrawing on SDL_WINDOWEVENT_EXPOSED is not enough. To reproduce, do the

  1. Start the program
  2. Maximize the window
  3. Minimize the window to the taskbar
  4. Unminimize the window from the taskbar again —> surprisingly, the result
    is a completely black window although I’m clearly redrawing everything on

Should this go to the bugtracker or am I missing something here? SDL_video.h
clearly says that

SDL_WINDOWEVENT_EXPOSED,        /**< Window has been exposed and should be
                                     redrawn */

So I think that I am not supposed to redraw on any other events but only
on EXPOSED. But as you can see in the small demo source, it doesn’t really
work. At least not on Win7 with SDL 2.0.3…–
Best regards,
Andreas Falkenhahn mailto:@Andreas_Falkenhahn
-------------- next part --------------
A non-text attachment was scrubbed…
Name: test.c
Type: application/octet-stream
Size: 1362 bytes
Desc: not available