1

I have a fullscreen transparent window. When the user clicks on it I want the click to be sent to what's underneath the window. How would I do so?

1

1 Answer 1

6

Setting IgnoresMouseEvents to YES should do the trick..

  • (void)setIgnoresMouseEvents:(BOOL)ignoreMouseEvents

Specifies whether the window is transparent to mouse clicks and other mouse events, allowing overlay windows.

http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSWindow_Class/Reference/Reference.html#//apple_ref/occ/instm/NSWindow/setIgnoresMouseEvents:

2
  • Thank you but there is a problem. If I set that property to YES not only the window ignores the mouse events, but the whole app does (I'm overriding -sendEvent: in an NSApplication subclass but it is not called on left mouse clicks anymore when I set 'setIgnoresMouseEvents' to NO.
    – Fatso
    Aug 3, 2013 at 21:20
  • 1
    I solved that thanks to this answer : stackoverflow.com/questions/1628366/…
    – Fatso
    Aug 3, 2013 at 21:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.