Cut down the amount of redrawing when simply moving the window around

This commit is contained in:
Robert Grant 2011-05-26 13:59:47 -04:00
parent d4b01357f2
commit 542c5fbedc

View File

@ -2591,11 +2591,16 @@ NSString * const NSWindowDidAnimateNotification=@"NSWindowDidAnimateNotification
[_childWindows makeObjectsPerformSelector:@selector(_parentWindowDidChangeFrame:) withObject:self];
[_drawers makeObjectsPerformSelector:@selector(parentWindowDidChangeFrame:) withObject:self];
[_backgroundView setFrameSize:_frame.size];
[_backgroundView setNeedsDisplay:YES];
if (didSize) {
// Don't redraw everything unless we really have to
[_backgroundView setFrameSize:_frame.size];
[_backgroundView setNeedsDisplay:YES];
// And make sure the cursor rect align with the new size
[self resetCursorRects];
}
[self saveFrameUsingName:_autosaveFrameName];
[self resetCursorRects];
if(didSize){
[self postNotificationName:NSWindowDidResizeNotification];