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:
parent
d63fe244b3
commit
8ab8bd733e
1 changed files with 4 additions and 9 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue