1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Optimisation to the last commit to avoid extra repainting when dragging windows

This commit is contained in:
jules 2015-12-01 16:01:06 +00:00
parent d63fe244b3
commit 8ab8bd733e

View file

@ -245,26 +245,21 @@ public:
fullScreen = isNowFullScreen;
NSRect r = makeNSRect (newBounds);
NSSize oldViewSize = [view frame].size;
if (isSharedWindow)
{
r.origin.y = [[view superview] frame].size.height - (r.origin.y + r.size.height);
if ([view frame].size.width != r.size.width
|| [view frame].size.height != r.size.height)
{
[view setNeedsDisplay: true];
}
[view setFrame: r];
}
else
{
[window setFrame: [window frameRectForContentRect: flippedScreenRect (r)]
display: false];
[view setNeedsDisplay: true];
}
if (oldViewSize.width != r.size.width || oldViewSize.height != r.size.height)
[view setNeedsDisplay: true];
}
Rectangle<int> getBounds (const bool global) const