What i want to do
I have a round custom subclass of NSView, and I want to change the appearance of the cursor when the mouse hangs over the circular parts of the view, but not when over the parts of the view rectangle that go beyond the circle.
Here is an illustration . I would include it with an image tag, but I'm too new to take part in such amazing features.
What I know so far
I know how to change the appearance of the cursor through NSCursor. I think the best way to accomplish this for a rectangular view would be with the cursor rectangle. I know that I can receive mouseMoved events (and should disable them when the mouse is not above this view using mouseEntered and mouseExited) and has a simple and inexpensive way to determine if a point is in a region of interest.
So what then is the problem?
As far as I can tell, the system does not send mouseMoved events to a view that is not the first responder. Therefore, if I want to receive mouseMoved events when the mouse hovers over my view, I need to steal the firstResponder status from the one who currently has it. If the text representation has focus, simply moving the mouse over such a view will lead to its theft, which is simply unacceptable from the point of view of ease of use.
So my question boils down to this: is there a better way to do this? Can I receive mouseMoved events without being the first responder?
Thanks!
I would add the following tags: custom-views mouse-events NSCursor firstResponder But then again, I'm SA noob, so I can't.