Re: LSUIElement and LSBackgroundOnly
Re: LSUIElement and LSBackgroundOnly
- Subject: Re: LSUIElement and LSBackgroundOnly
- From: Eric Schlegel <email@hidden>
- Date: Wed, 13 Jul 2005 13:00:44 -0700
On Jul 13, 2005, at 11:48 AM, Chad Jones wrote:
I couldn't find anything about incompatibility in the docs.
However, how do I keep the Dock from showing my application's Icon
if LSUIElement is not working?
Does this make any sense to anyone?
Are we supposed to use deprecated (NSUIElement) and undocumented
(zLSUIElement) keys?
NSUIElement is deprecated. However, I remember clearly from
working at Apple (Apple DTS) a few years back that NSUIElement and
LSUIElement map to the same thing (at least it did back when I was
there and I doubt that would have changed). Though NSUIElement is
depreciated (NS stands for next step of course! and LS stands for
launch services), they are exactly the same thing for all intents
and purposes.
That is still correct. The window server (which owns the relevant
bits of the process management code in this case) checks for both
NSUIElement and LSUIElement, and if either is set, the app is marked
as being a UIElement app. Which one you use does not make any
difference.
Last night I believed I remembered having a conversation with Eric
Schlegel back when I was working on the Kiosk stuff (technote
TN2062) that he said we never had to worry about an application
being a UIElement and a Background-Only application at the same time.
That's also correct, since the window server basically does this:
if ( app has LSBackgroundOnly or NSBGOnly keys )
appIsBGOnly = true;
else if ( app has LSUIElement or NSUIElement keys )
appIsUIElement = true;
so you can see that appIsBGOnly and appIsUIElement can't both be true
at the same time. LSBackgroundOnly or NSBGOnly will override LS/
NSUIElement.
However, now I think I might have been mistaken. I think what the
actual conversation was, was that an application should never be a
UIElement and a Kiosk application at the same time (something like
that).
That's also true. The mode set by SetSystemUIMode only applies when
the app is the active app, and UIElement apps generally aren't
supposed to become the active app, so using SetSystemUIMode in a
UIElement app doesn't make any sense.
Also, as to Stefan's original question he doesn't want his
application in the Dock but he's having issues with LSUIElement
(bug reports?). Any ideas on this?
No idea. LSUIElement=1 should be enough. If that's not working, it's
time for a bug report.
-eric
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden