FROM : David Duncan
DATE : Thu Apr 17 21:28:41 2008
On Apr 16, 2008, at 6:49 PM, Karl Goiser wrote:
> I'm creating a borderless window whose content view uses Core
> Animation...
>
> When I do this, the window is drawn without any shadow no matter the
> alpha of the content.
>
> - a borderless window with a normal view draws the window's shadow.
>
> - a normal window with a content view which uses core animation
> shows the window's shadow (for example, the Recipes example). This
> is probably because it is opaque.
>
> If I set the borderless window to opaque, a shadow is drawn.
> However, I want the window to be transparent - and have a shadow
> just like can be done with a normal view.
>
> Is there something I need to do to get the desired behaviour?
When all of your window contents are drawing via Core Animation (which
seems to be the case here) there is nothing for the Window Server to
use to calculate the shadow (the window is completely empty, hence no
shadow). You can draw something minimally to the window to give it
something to "grab onto" when calculating the shadow.
I'm going to go out on a limb and guess you want click-through on the
parts that remain transparent as well? You will soon find that isn't
possible either...
--
David Duncan
Apple DTS Animation and Printing
david.<email_removed>
DATE : Thu Apr 17 21:28:41 2008
On Apr 16, 2008, at 6:49 PM, Karl Goiser wrote:
> I'm creating a borderless window whose content view uses Core
> Animation...
>
> When I do this, the window is drawn without any shadow no matter the
> alpha of the content.
>
> - a borderless window with a normal view draws the window's shadow.
>
> - a normal window with a content view which uses core animation
> shows the window's shadow (for example, the Recipes example). This
> is probably because it is opaque.
>
> If I set the borderless window to opaque, a shadow is drawn.
> However, I want the window to be transparent - and have a shadow
> just like can be done with a normal view.
>
> Is there something I need to do to get the desired behaviour?
When all of your window contents are drawing via Core Animation (which
seems to be the case here) there is nothing for the Window Server to
use to calculate the shadow (the window is completely empty, hence no
shadow). You can draw something minimally to the window to give it
something to "grab onto" when calculating the shadow.
I'm going to go out on a limb and guess you want click-through on the
parts that remain transparent as well? You will soon find that isn't
possible either...
--
David Duncan
Apple DTS Animation and Printing
david.<email_removed>
| Related mails | Author | Date |
|---|---|---|
| Karl Goiser | Apr 17, 03:49 | |
| David Duncan | Apr 17, 21:28 |






Cocoa mail archive

