Re: Clicking through a NSView with CALayers
Re: Clicking through a NSView with CALayers
- Subject: Re: Clicking through a NSView with CALayers
- From: Bill Cheeseman <email@hidden>
- Date: Sat, 25 Apr 2009 17:26:13 -0400
On Apr 25, 2009, at 1:15 PM, Rowan Nairn wrote:
Here's how to reproduce my problem. Create a fullscreen transparent
window with an empty view and position it over some other app. You'll
see that when you click on the transparent area the view ignores the
click and lets the app behind be activated. This is the behavior I
want. Now change it to call:
[view setWantsLayer:YES]
Now if you click on the transparent region, you get click events in
the view and the background app never gets activated.
I have an identical setup on an application I'm currently working on,
and clickthrough works just fine for me.
My window is borderless and transparent, its entire area is covered by
an empty contentview and also by a CALayer with various sublayers.
When I turn clickthrough on and off, the application behaves as
expected. My contentview is set up as a layer-hosted view, not a layer-
backed view, in case that makes a difference.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
www.quecheesoftware.com
PreFab Software - www.prefabsoftware.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden