I added NSTrackingArea to my view to capture mouseEntered/mouseExited events. It works. Then, when mouseEntered event gets captured I do
[self.window invalidateCursorRectsForView:self];
And in - (void)resetCursorRects
method I draw image, create NSCursor from it and then:
[self addCursorRect:self.bounds cursor:myCursor];
It looks like working good, but sometimes, when dragging mouse (mouse down and dragged) over view cursor blinks (under the cursor appears some mysterious black quad, wich's size perfectly fits my cursor size. Only my cursor is circle. By the way that problem doesn't appears if my cursor is small. When ever it gets bigger it starts blinking. And it doesn't appears while no other drawings is being done at the same time.
What could be the problem?
Screens:
good moment:
bad moment: