Strange bug with yellow minimize buttons

Luminary
Posts: 5,143
Joined: 2002.04
Post: #16
-framework Carbon
Quote this message in a reply
Member
Posts: 104
Joined: 2007.01
Post: #17
No go. It didn't solve the problem - the yellow minimize button is still disabled when I quit the game. I also tried putting the call before setting the video mode... no difference.

On the other hand, I found this link while googling:
http://www.macworld.com/weblogs/macosxhi.../index.php

Changing the info.plist file the way they describe does solve the problem with the yellow minimize button; however, I'm not sure that players who run the game in Windowed mode will want the menu bar and dock to work this way.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #18
Interesting; it does suggest that hiding the Dock is the solution. Not sure why HideMenuBar isn't doing the trick, though.

There is another Carbon API, SetSystemUIMode, which might work -- seems like it might do what that plist key does. Something like:

Code:
#include <Carbon/Carbon.h>

SetSystemUIMode(kUIModeAllHidden, 0)

(take a look in /System/Library/Frameworks/Carbon.framework/Frameworks/HIToolbox.framework/Headers/MacApplication.h for more constants and documentation)
Quote this message in a reply
Member
Posts: 104
Joined: 2007.01
Post: #19
That didn't work either. But I looked at that info.plist change some more, and I finally realized it is not exactly hiding the dock - it's making it auto-show. So I tried this:

SetSystemUIMode(kUIModeContentSuppressed, 0);

and it worked. I have no idea why, but I'm glad it's fixed. Thanks everyone for your help, especially OneSadCookie. You might be one sad cookie, but you're one great Mac programmer! Smile

Incidentally, I had to make this call after calling SDL_SetVideoMode whenever it changed to fullscreen. This included program startup and toggling into fullscreen from my Options Menu.
Quote this message in a reply
Moderator
Posts: 3,577
Joined: 2003.06
Post: #20
I was just trying out other games and samples that I had while trying to figure out why my screen turns blue while swithing modes even after I've gamma faded out. For my problem it appears that this happens under all circumstances in any app that captures the display and switches mode. It didn't used to do that as I recall, so maybe there was a system update that changed that behavior (to be broken now, at least on my machine). Anyway, that's beside the point of this post...

Whilst trying out other apps in full screen I happened upon Mountain Tanks and my yellow minimize button stopped working immediately after trying it out in full screen. I know that Mountain Tanks uses SDL, so there's some more confirmation for you.

You mentioned that SetSystemUIMode(kUIModeContentSuppressed, 0); worked for you so I dug through some Apple sample code to find their kiosk sample which uses the SystemUIMode API. Sure enough, just playing with that got my yellow minimize buttons right back.

Methinks SDL is doing something funky behind the scenes that they don't need to be doing in fullscreen. Whatever the case, just thought I'd share some confirmation.
Quote this message in a reply
Member
Posts: 104
Joined: 2007.01
Post: #21
Thanks for the confirmation, AnotherJake!

As of today, I still haven't heard anything back yet from my bug report filing with SDL (Bug #404). But at least now we have a confirmed workaround.
Quote this message in a reply
Member
Posts: 104
Joined: 2007.01
Post: #22
SDL Bug #404 was marked as a duplicate of 281. Click on the bug numbers to go to the official SDL bugzilla pages.

Here's a comment from Mike Blaquszewski who handled this bug report:

"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."

I don't know if the downloadable binaries were updated for this patch, though.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Game buttons Miglu 7 4,037 Sep 25, 2010 01:42 PM
Last Post: AnotherJake
  GLUI buttons eShad0w 1 6,522 Jul 6, 2006 12:17 PM
Last Post: Duane
  textured windows/animated buttons hyperzoanoid 5 4,008 Jan 5, 2003 01:19 PM
Last Post: hyperzoanoid
  Receiving mouse clicks from different buttons Tobi 6 5,265 May 20, 2002 12:22 AM
Last Post: Tobi