Mailing Lists: Apple Mailing Lists

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

Re: LSUIElement problem [reposted with correct title]



(Re-replying to the updated thread... I'm way behind on this list.)

On Oct 14, 2007, at 10:35 PM, Adrian Ross wrote:

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?

Ouch... When starting up the AWT, it registers the application with the Process Manager, but does not check for LSUIElement during the startup, so it always registers as a normal, foreground application. I doubt that there's any way to work around this.

However, on Leopard, we now read in any Info.plist in the bundled application and augment it as necessary during startup. I recognize that doesn't help you on Tiger, though, so please file a bug and we'll see what we can do about fixing it.

Scott

------------------
Scott Kovatch
Apple Inc.
Java Runtime Classes
email@hidden

I am Scott Kovatch, and I approved this message.

 _______________________________________________
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

References: 
 >LSUIElement problem [reposted with correct title] (From: Adrian Ross <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.