I have a custom NSWindow without borders in the shape of a circle. To do this, I use a custom NSView that draws a filled circle.
The mouse clicks on a transparent pixel inside the contents of the window directly through the window so that any application is behind it. Clicks inside the filled circle are intercepted by my application. So far so good.
The problem is that in the next line, the above behavior changes and all clicks inside the contents of the Windows content are intercepted, a transparent pixel or not:
[circleView setWantsLayer:YES]
Is there a way for clicks on the transparent pixels of CALayer instances CALayer pass through the window / view / layer into the application behind it?
This is essentially the same as described below (only that the solution does not work in all cases, because it does not support animation):
http://www.cocoabuilder.com/archive/cocoa/235281-clicking-through-nsview-with-calayers.html
source share