windowIgnoresMouseClicks - NSView desktop component


I try to create a desktop component who act as pass-through for all event (mouse, keyboard), so the window behind it can intercept this events.

The better solution would be to attach my component to a native OS window (actually OSX, but also Windows in future).

the code below works (I can click through my component)

addToDesktop(ComponentPeer::StyleFlags::windowIgnoresMouseClicks, 0);

but when I try this, it don't :

addToDesktop(ComponentPeer::StyleFlags::windowIgnoresMouseClicks, cocoa_view);

Maybe it's a newbie or a naive question but I can't figure why it doesn't work .

Could anyone help me with this or have a better solution ?

Thanks for the help.


Hi Eliott,

Is it for Max/MSP?

Yes it's for MaxMSP.