It's not that complicated. For my particular window, I want to make
sure that the cursor can't get in front of it. So either the
cursor should be hidden whenever its in my window, or it should
switch to a transparent cursor. Having the window manager
switch the cursor is what I'd like, since I don't want to
have to create a thread to service window events.
Since Carbon does not support automatic cursor switching, let's
consider approaches that allow you to do it manually. It does seem to
me that you could implement this quite easily using two event
handlers for kEventWindowCursorChange and kEventMouseMoved. Install
these on the application event target. When you get the CursorChange
event, check the window parameter in the event; if it's the window
that should hide the mouse, then hide it with HideCursor(). When you
get the MouseMoved event, you'll know that the mouse is not over one
of your windows, so you can show the cursor with ShowCursor(). I
wrote a quick test app that does this and, at a first approximation,
it seems to work pretty well.
You mentioned in a previous message that when you clicked in the
window, the cursor became visible again. I didn't see that problem
for normal clicks in my test window, but I was just using standard
HIToolbox controls. What kind of content does your window use -
standard controls, or your own custom content?
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden