OS X and hiding windows (OpenGL)

Hi,

I have two issues on OS X with hiding an OpenGL window. This is
occurring on OSX 10.5 i386 and 10.6 x86_64. I wish to know if anyone
else has these issues and possibly a solution.

I am calling fullscreen mode from my application like so:

—snip—
SDL_SetWindowSize(sdlWindow, 1280, 800);
SDL_SetWindowFullscreen(sdlWindow, SDL_TRUE);
—snap—

On to the issues!

Issue #1 - Hiding a window messes up fullscreen switching:

  1. Start a program in windowed mode
  2. Hide the window (command-H or menu, whatever)
  3. Restore
  4. Change to fullscreen
  5. Fullscreen fails!

I am not very adept at debugging on OS X, but with some printf
statements I got the following events when doing the above steps:

—snip—
event 6 (SDL_WINDOWEVENT_SIZE_CHANGED)
size change: 1280 695
event 5 (SDL_WINDOWEVENT_RESIZED)
resize: 1280 695
—snap—

Without doing the hide/restore steps above, I get (correctly, I
believe) the following events and I enter fullscreen mode properly:

—snip—
event 4 (SDL_WINDOWEVENT_MOVED)
moved: 0 0
event 6 (SDL_WINDOWEVENT_SIZE_CHANGED)
size change: 1280 800
event 5 (SDL_WINDOWEVENT_RESIZED)
resize: 1280 800
—snap—

As you can see, after doing the hide/restore the window is not moved
to 0,0 and the size isn’t being set to fullscreen; the size is instead
set to the maximum height a windowed window is allowed without
covering the menu bar or the bottom dock.

Issue #2 - Hiding fails while in fullscreen:

  1. Start a program in windows OR fullscreen mode
  2. Hide using command-H
  3. Program stays fullscreen but goes completely black

You have to use command-Q to exit the program. It seems that all
drawing ceases upon invoking the hide command. I’m not sure if this
is related to Issue #1, but the printf statements with the events look
normal to me.

Thanks for any help!
D