• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Setting the cursor when not active/frontmost app?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Setting the cursor when not active/frontmost app?


  • Subject: Setting the cursor when not active/frontmost app?
  • From: Daniel Jalkut <email@hidden>
  • Date: Thu, 8 May 2003 17:26:23 -0700

My program is a faceless background application with a NSStatusItem and menu. I would like to set a custom mouse cursor when the user is holding down certain modifier keys. What I'm doing is using Carbon menus and PopUpMenuSelect, so I can install an event handler and listen for modifier key changed events. When I get those events, I pick a new cursor and set it.

I'm trying to use the NSCursor functionality to do this. The obstacle I'm running into is that if I am not the fronstmost/active application (which I rarely am, being a faceless background app), then the NSCursor push or set call has no effect.

Just because I'm not "the front-most app," doesn't mean I don't have complete control of the UI for the time while the user is tracking my menu. I can responsibly set and restore the cursor so it only affects the time that the user is tracking my menu.

Is there some way for me to bypass this limitation of NSCursor? I haven't tried using Carbon's SetCursor yet. I was hoping somebody else had gone through this and found a workable solution.

Thanks!
Daniel
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Loosing threads in cocoa
  • Next by Date: weird problem ...
  • Previous by thread: NSPopUpButton weirdness
  • Next by thread: weird problem ...
  • Index(es):
    • Date
    • Thread