1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-29 02:40:05 +00:00

macOS: Redraw drop-shadow on repaint for transparent NSWindows to fix some drawing artifacts

This commit is contained in:
ed 2021-01-07 12:25:21 +00:00
parent 72695f91c7
commit 8d3fd92784

View file

@ -876,13 +876,18 @@ public:
drawRect (cg, rect, displayScale); drawRect (cg, rect, displayScale);
CGContextRestoreGState (cg); CGContextRestoreGState (cg);
} }
return;
} }
} }
else
#endif #endif
{
drawRect (cg, r, displayScale);
}
drawRect (cg, r, displayScale); // transparent NSWindows with a drop-shadow need to redraw their shadow when the content
// changes to avoid stale shadows being drawn behind the window
if (! isSharedWindow && ! [window isOpaque] && [window hasShadow])
[window invalidateShadow];
} }
void drawRect (CGContextRef cg, NSRect r, float displayScale) void drawRect (CGContextRef cg, NSRect r, float displayScale)