From f7406e74ae9f15c476e5735ec1539daf8abf2ee8 Mon Sep 17 00:00:00 2001 From: Ken Thomases Date: Thu, 28 Mar 2013 23:33:59 -0500 Subject: [PATCH] winemac: Invalidate window shadow on every draw for transparent windows. --- dlls/winemac.drv/cocoa_window.m | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m index a2087dafd9d..48ca59364f7 100644 --- a/dlls/winemac.drv/cocoa_window.m +++ b/dlls/winemac.drv/cocoa_window.m @@ -231,18 +231,20 @@ - (void) drawRect:(NSRect)rect CGContextDrawImage(context, imageRect, image); CGImageRelease(image); - - if (window.shapeChangedSinceLastDraw || window.colorKeyed || - window.usePerPixelAlpha) - { - window.shapeChangedSinceLastDraw = FALSE; - [window invalidateShadow]; - } } } pthread_mutex_unlock(window.surface_mutex); } + + // If the window may be transparent, then we have to invalidate the + // shadow every time we draw. Also, if this is the first time we've + // drawn since changing from transparent to opaque. + if (![window isOpaque] || window.shapeChangedSinceLastDraw) + { + window.shapeChangedSinceLastDraw = FALSE; + [window invalidateShadow]; + } } /* By default, NSView will swallow right-clicks in an attempt to support contextual