I have written a Cocoa program to change the cursor after a button press. Specifically, the cursor includes an image instead of a pointer. I set it using the following commands:
NSImage *tmpImage = [NSImage imageNamed:@"pointer"];
NSCursor *pointer = [[NSCursor alloc] initWithImage:tmpImage hotSpot:NSMakePoint(10.0, 10.0)];
[pointer set];
This works and the cursor changes correctly. However, this change does not hold for all applications. For example, when I switch to a Keynote presentation in Slideshow mode, the cursor changes back to the arrow. When I switch to the PDF full-screen display for a presentation, the cursor changes to a hand (I believe these are the default cursors set by the respective applications).
My question is: Is there any way to override those and just keep my custom cursor for all applications? I would like to keep my changed cursor even during a Keynote slideshow and a PDF full-screen view. Any ideas?
Thanks!