BenL0
BenL0

Reputation: 287

How to pass click on NSView through to app window beneath it?

My app has a NSView in a NSWindow which covers the screen and draws a semi-transparent shade on it, above that I've got another NSWindow which contains my app's UI, so the full screen view is designed to fade out background distraction of other windows.

How can I allow mouse clicks on the full screen view to go straight through to the underlying window, which will belong to another app, or even the desktop? Note that I don't want it to keep focus on my app.

Upvotes: 2

Views: 1653

Answers (1)

Anne
Anne

Reputation: 27073

Shady by Matt Gemmell does exactly the same, take a look at the source: http://instinctivecode.com/shady/

It does this by sending the following message to the window:

[window setIgnoresMouseEvents:YES];

Upvotes: 5

Related Questions