We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 404

Summary: Fullscreen disables yellow minimize buttons on other Mac apps
Product: SDL Reporter: My Game Company <info>
Component: *don't know*Assignee: Ryan C. Gordon <icculus>
Status: RESOLVED DUPLICATE QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: info
Version: 1.2.11   
Hardware: PowerPC   
OS: Mac OS X 10.4 (Intel)   
URL: http://www.dirkdashing.com

Description My Game Company 2007-03-03 10:08:11 UTC
Running Mac OS 10.4.8 on Intel-based MacBook. Customer is starting our game (Dirk Dashing) in fullscreen mode with Safari and other apps running in the background. When they quit our game, the minimize buttons on all the other apps are disabled. This does not occur when running our game in Windowed mode.

Here is our code for changing into fullscreen:

   const SDL_VideoInfo* info = SDL_GetVideoInfo();
   if (info == NULL)
   {
      DEBUG("ERROR! Failed to get video information!");
      exit(0);
   }

   int color_depth = info->vfmt->BitsPerPixel;

   SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 5);
   SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 5);
   SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 5);
   SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16);
   SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);

#ifdef WIN32
   SDL_Surface* icon_surface = SDL_LoadBMP("./Textures/iconwin.bmp");
#else
#ifdef LINUX
   SDL_Surface* icon_surface = SDL_LoadBMP("./Textures/icon.bmp");
#endif
#endif
   SDL_WM_SetIcon(icon_surface, NULL);

   Uint32 flags = SDL_OPENGL;
   if (fullscreen) flags |= SDL_FULLSCREEN;
   SDL_Surface* surface = SDL_SetVideoMode(length, width, color_depth, flags);
   if (surface == NULL)
   {
      DEBUG("ERROR! Failed to set video mode!");
      exit(0);
   }

Am I doing something wrong, or is this a bug in SDL? This code works fine on both Windows and Linux, and it works on Mac OS X (except for the minimize buttons being disabled when the game quits).
Comment 1 My Game Company 2007-03-04 17:13:31 UTC
I found a workaround. I added this code after my call to SDL_SetVideoMode:

#ifdef __APPLE__
if (fullscreen == true)
{
   SetSystemUIMode(kUIModeContentSuppressed, 0);
}
#endif

It would be nice if this would be incorporated into the SDL_SetVideoMode function, or perhaps the Cocoa equivalent (since the SDL XCode project uses Cocoa).
Comment 2 Mike Blaguszewski 2007-04-06 17:53:25 UTC

*** This bug has been marked as a duplicate of bug 281 ***
Comment 3 Mike Blaguszewski 2007-04-06 18:24:53 UTC
I've attempted to the use the workaround given here, but it caused the system cursor to unhide when clicking on very top of the screen, where the menu bar would be. So I've applied the patch given for bug 281 to the 1.2.11 sources, and that seems to work fine.