mirror of
https://github.com/darlinghq/darling-cocotron.git
synced 2024-10-07 09:33:28 +00:00
Cut down the amount of redrawing when simply moving the window around
This commit is contained in:
parent
d4b01357f2
commit
542c5fbedc
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user