Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

simplebeep

macrumors member
Original poster
Sep 28, 2007
43
0
SLC
So I'm making an application that, if the user chooses, can display a "backdrop" window behind the composition window, to help block out clutter. It works similarly to John Haney's app in that it's just a window that can float in front of or behind any window. All that works just fine.

However, (Snow) Leopard's "translucent" menu bar is not really translucent, it just samples the desktop picture. So if the user has a particularly colorful desktop and puts a neutral, calm picture up in my app, there's an annoying stripe of color at the top of the screen. So my question is: How can I turn off menu bar "translucency" for just my app? It would even be fine by me if the app changed the user's preferences until it quit.

I know that the general user preference for translucency is stored in NSGlobalDomain's AppleEnableMenuBarTransparency key, and I know from research that when the user changes it from System Preferences, a notification is sent out similar to
Code:
[[NSDistributedNotificationCenter defaultCenter] postNotificationName:@"AppleMenuTransparencyChanged" object:nil];

And it looks like, from my testing, if you just change the preference from the Terminal, only applications that launch thereafter recognize the difference; which makes it seem to me like some automated method is getting called when applications launch that checks whether the application should draw its menus translucently or not. If so, I hope to override that method. (Could it be as simple as a (BOOL)menuShould… delegate?)

I realize that I could just hide the menu bar when the backdrop window came up, but hiding it is a preference the user can select independently (and besides, the only way I know how to hide the menubar also keeps the Dock from opening even on mouseover, an issue for a different thread). If anyone can think of an answer to this conundrum, I would greatly appreciate it!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.