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: Changing or hiding the cursor in a background app?



On 1/18/06 8:48 PM, Brian Kendall didst favor us with:

> 
> I have a Carbon app I'm working on that runs entirely in the background,
> and I want it to be able to change or hide the cursor from time to time.
> This app doesn't necessarily have any windows, and it doens't have a dock
> icon or menu bar.  (It can use either LSBackgroundOnly=1 or LSUIElement=1
> in its info.plist.) The problem is that any calls I make to
> SetThemeCursor(), HideCursor(), or (now that HideCursor is depreciated)
> CGDisplayHideCursor() doesn't do anything, and I traced the problem to the
> application process not being active.
> 
> The way I finally got the cursor to change was by setting LSUIElement to 1
> (not LSBackgroundOnly) and making my application the front process by
> calling SetFrontProcess().  Unfortunately, that makes the previous front
> process not the front process anymore, and as such any windows, buttons,
> or text fields that the user was working with are deactivated and that
> application loses its keyboard focus.  I don't want this to happen - my
> app isn't ever supposed to have focus, and furthermore it's supposed to be
> usable while working in another application.
> 
> So, the crux of it is, is there anyway I can change and/or hide the cursor
> while another application is the front process?  Or is there any other way
> I can get this to work?

No. Only the active application should be changing the cursor. Anything else
is not supported because it is likely to confuse users. This falls squarely
into the Bad Idea category.

Larry

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

This email sent to email@hidden

References: 
 >Changing or hiding the cursor in a background app? (From: "Brian Kendall" <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.