Yes this is possible. I had an almost similar requirement, and here is how I solved it:
When creating a window, create a transparent view with the same frame
as that of the window. Then add a cursor rect to the view (that extends to the latter's bounds
) for your specific cursor. Finally add it as the last subview of the window's contentView
, so that it acts as an overlay. When this overlay is present, cursor rects of underlying views are not activated.
See https://stackoverflow.com/a/43886799/7908996 for detailed instructions and working code (read the window's contentView
instead of WebView
). It also describes how to revert back to the usual behaviour.
Hope that helps! :)