Toggle Full Screen in Windows (strange)

If anyone can explain the following strange behavior, I would be very
interested. I’m especially interested in hearing if this will work on other
platforms (I’ve only tested on Windows Me so far, and am using SDL 1.2.5).

The first issue I have, is that quitting when an SDL_FULLSCREEN video mode
was used shrinks any previously ‘maximized’ windows applications. To get
around this I first have to make sure my first call to SDL_SetVideoMode()
does not include the SDL_FULLSCREEN flag. If I want to start in full
screen, I then release the non-SDL_FULLSCREEN buffer and call
SDL_SetVideoMode() again (this time with SDL_FULLSCREEN). Doing this
reduces the problematic behavior to occur maybe 1/10 times (and exclusively
when the last SDL_SetVideoMode() was passed the SDL_FULLSCREEN flag). So if
that was the case, I additionally release the current screen, call
SDL_SetVideoMore() to acquire another without the SDL_FULLSCREEN, and then
of course release that surface before quitting the program. This seems to
have completely eliminated the problem of previously ‘maximized’ windows
being shrunk. It also makes for a bunch of trashy looking code. Any
suggests, or fixes would be appreciated.

The second issue I have has to do with using SDL_ShowCursor(SDL_DISABLE)
since my program draws its own cursor. When I go from full screen to
windowed, the cursor goes from invisible to visible. If I call
SDL_ShowCursor(SDL_DISABLE) again at this point, nothing happens (the
windows cursor continues to be displayed). In order to get it to work
right, I have to call SDL_ShowCursor(SDL_ENABLE) followed by
SDL_ShowCursor(SDL_DISABLE), and then the cursor disappears as desired. Not
a huge deal, but it seems like this is probably a bug.

Thanks in advance for any help, advice, or time you may put into this.
Best, LiquidAsh.

If anyone can explain the following strange behavior, I would be very
interested. I’m especially interested in hearing if this will work on other
platforms (I’ve only tested on Windows Me so far, and am using SDL 1.2.5).

Can you try with SDL in CVS and if that doesn’t fix it, can you send me
a minimal program (with source) that I can use to try to reproduce it here?

Thanks!
-Sam Lantinga, Software Engineer, Blizzard Entertainment