Re: NSWindow - flickering shadow during height animation (borderless, transparent)
Re: NSWindow - flickering shadow during height animation (borderless, transparent)
- Subject: Re: NSWindow - flickering shadow during height animation (borderless, transparent)
- From: Robert Vojta <email@hidden>
- Date: Wed, 24 Apr 2013 08:29:57 +0200
On Wednesday, 24. April 2013 at 1:28, Ken Thomases wrote:
Hi Ken,
> It's not clear if you tried to use [self invalidateShadow] instead of all three lines or just instead of the last two. The shadow shape is computed from the visible content of the window. That's why there's a call to -display there, to make sure the visible content is up to date. However, I would expect that using [self invalidateShadow] after a call to display would be at least as effective as toggling the hasShadow property and would possibly avoid the flicker.
yes, I tried to use [self invalidateShadow]. Flickering is less frequent sometimes, but it's still there. And what's much worse is that [self invalidateShadow] produces ugly artifacts sometimes. Shadow rectangle at the top with height of +-20px, etc. In my case, I have to set it to NO/YES to have 100% correct shadow.
> Why are you setting the window not to have a shadow here?
Yeah, you're right. It was copy & paste of code after experiments. Yes, I've got setHasShadow:YES there.
Regards,
Robert
P.S. Anyone does know why the shadow is not drawn around subview where I have wantsLayer = YES? See this … http://d.pr/i/q71h The structure is …
window (NSView)
+ contentView (NSView)
- status view (NSView)
- user selection view (NSView with wantsLayer = YES => no shadow)
- photos view (NSView)
- ...
… I do not need layer for this view and actually no view has wantsLayer set to YES, asking just because I'm curious why the shadow is not drawn at all in this case.
_______________________________________________
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