I have a transparent web view which is a large rectangle. The webpage it loads has smaller rectangles that don’t fill the whole web view. So in those spaces not occupied by divs, you can see through the web view to whatever window or app is behind. Although you can see through, you can’t click through.
I need to be able to click through the web view in parts of it that don’t have active content.
Any ideas?
One of my ideas was have a transparent nsview on top of the web view, intercepting mouse downs , getting the coordinate, then referencing that coordinate in the web view and seeing if there is active content there, and if so, passing the mouse down event to the web view, but if not, ignoring it/passing it behind. This makes sense to me, but i don’t know how I would accomplish this…
You need to subclass
WebViewand implement thehitTest:method. In your method, you need to test to see if the mouse is in one of the “active” regions of your web view and if it is not, return the view’s next responder as the view passing the hit test.