Disclaimer; barely a novice when it comes to Swift/macOS development.
The Ctrl+Shift+4 screenshot tool on macOS, has an accompanying cursor change that I've been looking for a way to replicate.
In its initial launch state, it's a crosshair with pixel coordinates, and switching it to window capture, by pressing space, changes the cursor to a camera.
No matter if you tab to other applications, the cursor remains changed, globally.
I've tried to replicate this behaviour by creating an see-through fullscreen NSWindow with a .floating level and changing the cursor for the content view.
This works, sort of... But has some annoying quirks.
Firstly it seems the opacity of the view cannot be a strict zero, but at least some fraction >= 0.01. I found no mention of this in the docs of NSView, but it's mentioned for UIView here. For the built-in screenshot tool, there doesn't seem to be any 0.01 alpha overlay.
Secondly, tabbing to any application, the .floating window is still on top, but makes the view loose focus, which means the cursor turns back to default. In this case, the built-in screenshot tool has a very short delay, when a new application is fronted, and then changes the cursor to the custom one again.
Am I taking the completely completely wrong approach, or do I just need to twist some nobs and dials, for this one to work?
Any pointers much appreciated!