Re: setting the cursor from an NSBackgroundOnly app
Re: setting the cursor from an NSBackgroundOnly app
- Subject: Re: setting the cursor from an NSBackgroundOnly app
- From: glenn andreas <email@hidden>
- Date: Sat, 16 Jul 2005 09:55:15 -0500
On Jul 16, 2005, at 9:43 AM, Chase wrote:
my app is technically a background only app, but it does have a
window that can be opened from its status item in the menu bar.
the window has a few checkboxes, buttons, and uneditable textfields
in it. nothing else. nothing that can be typed into.
the pointer should be the standard arrow pointer when hovering over
this window, and usually it is.
but... if the window happens to be ontop of another app with, for
example, a scrollview that scrollss all of a sudden, that scrolling
action causes the cursor to switch to an ibeam, even though the
pointer is directly over my window.
how can i make sure that the pointer always stays an arrow pointer
when it's over my window, no matter what's going on in window
behind it.
it seems that setting the cursor works fine when i remove the
LSBackgroundOnly = 1 line from the info.plist.
when i put it back in, setting the cursor no longer works.
what can i do?
From the documentation:
LSBackgroundOnly
If this key exists and is set to “1”, Launch Services runs the
application in the background only. You can use this key to create
faceless background applications. You should also use this key if
your application uses higher-level frameworks that connect to the
window server, but are not intended to be visible to users.
So basically, LSBackgroundOnly is for _faceless_ background only
apps, i.e., not intended to be visible to users. If you're going to
make a window visible to the users, it isn't faceless, and so
shouldn't use this flag.
I'm guessing here (since I don't know exactly what your application
is doing), but you probably want:
LSUIElement
If this key is set to “1”, Launch Services runs the application as an
agent application. Agent applications do not appear in the Dock or in
the Force Quit window. Although they typically run as background
applications, they can come to the foreground to present a user
interface if desired. A click on a window belonging to an agent
application brings that application forward to handle events.
Glenn Andreas email@hidden
<http://www.gandreas.com/> wicked fun!
Widgetarium | the quickest path to widgets
_______________________________________________
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