Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

LSUIElement problem [reposted with correct title]



I have a simple "control panel" Cocoa app to configure and launch an agent process - a Java app bundle. Being an agent it's almost headless (except for the odd Swing alert) so I'm setting LSUIElement to 1 in the Info.plist to avoid dock icon, menu bar etc.

My problem is that when the control panel launches the agent, the agent becomes the frontmost application. The control panel's window is inactive; its menus still appear, although greyed out. The worst of it is that the agent receives key events, thus when a user presses command-Q, thinking they're quitting the control panel, they quit the agent. Grrr.

This state of affairs only persists until the control panel app is activated, say by clicking its window, but this is still a problem.

I'm sure its something to do with my agent's Java app bundle, because if I substitute any old cocoa app (with its Info.plist tweaked) the problem goes away, ie. the control panel retains focus. I'm creating my Java app in the recommended way, using the JavaApplicationStub executable from the JavaVM framework.

Anyone know what I can do to make LSUIElement act the same way for my Java app as it would for a Cocoa app?

Thanks,
Adrian
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.