简体   繁体   中英

Graphics error with NSStatusItem

My application uses NSStatusItem to be visible to the user. So I set 'Application is agent (UIElement)' to YES, which basically hides the menu bar of the application, and hides the icon from the dock. Now, I didn't delete the menu bar, so I can still react to shortcuts like cmd+W to close the preference window, or cmd+q to quit the application. The problem is, that anytime I use such a command, the menubar get's messed up. I've noticed that other Apps which run in the background, like Growl 2, have the same issue.

菜单栏图形错误

I have no idea how to fix this. Hopefully someone of you can help me

I'm running Mountain Lion.

thanks!

HINT

It probably has something to do with the 10.8 SKD. I have never noticed this issue before in any application.

How about move the whole Window menu to be Application menu submenu and then hide it? You will still receive shortcuts and the highlited menu will be the application menu that is by anyway there (i suppose so, how else you will open preferences window? also shortcut?).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM