Module: wine
Branch: master
Commit: f7406e74ae9f15c476e5735ec1539daf8abf2ee8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f7406e74ae9f15c476e5735ec…
Author: Ken Thomases <ken(a)codeweavers.com>
Date: Thu Mar 28 23:33:59 2013 -0500
winemac: Invalidate window shadow on every draw for transparent windows.
---
dlls/winemac.drv/cocoa_window.m | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m
index a2087da..48ca593 100644
--- a/dlls/winemac.drv/cocoa_window.m
+++ b/dlls/winemac.drv/cocoa_window.m
@@ -231,18 +231,20 @@ static inline void fix_generic_modifiers_by_device(NSUInteger* modifiers)
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