application menu focus problems (mac os x)
I've not been able to pin point exactly what causes this bug, but it is most annoying.
I tend to switch applications a lot, and minimize idea frequently. I've noticed that sometime upon returning to IDEA focus doesn't completely return. This also happens I believe when several of the dialog boxes that IDEA generates change the focus of the app.
Essentially, the application menu becomes useless. Every menu option is grayed out and can't be used. The IDEA window menu continues to work however. But key mappings that exist in the application menu as well as the IDEA menus stop working. Command + Q for instance stops working and the only way to close IDEA is to use the File menu and click exit. The rest of IDEA works as expected and is fully functional.
This problem just seems to get even worse if you hack the Info.plist file and set the apple.laf.useScreenMenuBar property to true. In this case the whole IDEA menu system becomes unusable, the only way to exit is by clicking the "Close Window" control button in the top corner of the app window (this only works in more recent builds 1117 that i know of). Or by using force quit.
Like I said in the beginning, I am not sure what is the cause of this so this post is really just to find out if anyone else is experiencing the same problems on OS X.
I am currently running 10.3.2 with the ADC DP2 release of Java 1.4.2_03.
Please sign in to leave a comment.
There are a number of other threads discussing this. Does the app also close if you choose file->exit?
If I am not using a modifed Info.plist file with the apple.laf.useScreenMenuBar property set to enable the mac screen menu then yes the app does close.
If that property is set to true, and this happens then nothing works from the menu. I can't still choose the item and it indicates visually (by blinking slightly) that the menu item selection has succeeded but the action never occurs.
ie. If i were trying to perform the following from the menu the CVS -> Show File View or the Build -> Make Project, then the File view window would never appear or the build process would never start.
One thing to note, in both cases choosing Quit from the Dock has no effect either. When normally choosing quit from the Dock or the applicition menu works beautifully.
I don't know if this will help, but these APIs are hard to find from developer.apple.com these days...
http://developer.apple.com/documentation/Java/Reference/1.4.1/Java141API_AppleExtensions/api/index.html
There even appears to be an undocumented method that is can be used to obtain an Application instance Application.getApplication(). Use of this method can be seen in the base Swing java project that is built by Xcode.
I noticed something else today that I've seen before. I'm now using build #1131
I have IDEA in my dock as a shortcut. When I click on the shortcut the app starts like normal. When i minimize IDEA, it minimizes down next to my trash like all other apps. However, if I click IDEA shortcut again (not the minimized icon) IDEA will popup on my screen. But it doesn't actually maximize. The minimized IDEA icon remains next to my trash, and in fact to then minimize the window again. I first have to click the minimized icon so it will maximize the window again. Then I can double click in the title bar to minimize again.
Getting back to this, I have managed to find a way to replicate the problem.
Upon loading IDEA, as soon as the splash logo disappears minimize the app window. IDEA will minimize to the dock. When the scheduled "Loading Project" dialog displays it steals focus and bring the entire IDEA app to focus. However, the app still remains in the minized state in the doc. Even though it is displayed full screen and has focus. Clicking on the minimized icon on the doc will cause IDEA to redraw as if coming back from being minimized. However from this point on. The Application Menu no longer works. Nor does the command + q short cut to quit the IDEA.