Setting the cursor when not active/frontmost app?
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.