简体   繁体   English

NSStatusItem出现图形错误

[英]Graphics error with NSStatusItem

My application uses NSStatusItem to be visible to the user. 我的应用程序使用NSStatusItem对用户可见。 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. 所以我将'Application is agent(UIElement)'设置为YES,它基本上隐藏了应用程序的菜单栏,并隐藏了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. 现在,我没有删除菜单栏,所以我仍然可以对像cmd + W这样的快捷方式做出反应来关闭首选项窗口,或者cmd + q来退出应用程序。 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. 我注意到在后台运行的其他应用程序,如Growl 2,也有同样的问题。

菜单栏图形错误

I have no idea how to fix this. 我不知道如何解决这个问题。 Hopefully someone of you can help me 希望你们中的某个人可以帮助我

I'm running Mountain Lion. 我正在运行Mountain Lion。

thanks! 谢谢!

HINT 暗示

It probably has something to do with the 10.8 SKD. 它可能与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? 如何将整个Window菜单移动到Application菜单子菜单然后隐藏它? 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?). 您仍然会收到快捷方式,并且高位菜单将是应用程序菜单,无论如何(我想是这样,您将如何打开首选项窗口?还有快捷方式?)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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