On Sun, Apr 26, 2009 at 3:08 AM, Bill Cheeseman <b...@cheeseman.name> wrote:
> Making the window invisible isn't relevant -- visual transparency and
> clickthrough are two different qualities. To make a window transparent to
> mouse events, you have to call -[NSWindow setIgnoresMouseEvents:YES]. Note
> that the entire window will be clickthrough, not just transparent areas.
> Clickthrough works even on windows that are not invisible. It's normally
> used to make overlay windows.

Ok.  I think a little detail of my requirements got lost in this
thread somewhere.  I'm sorry I'm not able to ask this question clearly
enough.  Thanks for keeping at this.  So the little detail is this:  I
don't want to make my whole window transparent to mouse events.  There
are bits of my window on which I want to detect clicks.  Those are the
bits that I've drawn on.  I want the bits I haven't drawn on, the
visually transparent bits, to ignore clicks.

When I use [NSView drawRect:] this works as expected - any pixel that
is visually transparent is also transparent to clicks.  However when I
use a layer (either hosted or backed) the whole area intercepts
clicks, whether visually transparent or not.  I'm starting to think
there's no way around this so I might just go back to [NSView
drawRect:] even though it makes the animation slower.

Hope that was somewhat clearer.  Thanks for the help,
Rowan
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to