Don't try to animate frame changes on windows that shouldn't even be ordered in yet.
authorPeter Hosey <hg@boredzo.org>
Sun Feb 07 07:36:04 2010 -0800 (2010-02-07)
changeset 45791f9563105fd9
parent 4578 fe44b97253d1
child 4580 636cf942efe9
Don't try to animate frame changes on windows that shouldn't even be ordered in yet.

This change makes WebKit displays *REALLY* snappy—throwing 20 of them on the screen is almost as fast as with Cocoa displays. Victory.
Core/Source/GrowlPositionController.m
Plugins/Displays/WebKit/GrowlWebKitWindowView.m
     1.1 --- a/Core/Source/GrowlPositionController.m	Sun Feb 07 07:31:50 2010 -0800
     1.2 +++ b/Core/Source/GrowlPositionController.m	Sun Feb 07 07:36:04 2010 -0800
     1.3 @@ -260,7 +260,7 @@
     1.4  	// Try and reserve the rect
     1.5  	NSRect displayFrame = idealFrame;
     1.6  	if ([self reserveRect:displayFrame inScreen:preferredScreen forDisplayController:displayController]) {
     1.7 -		[[displayController window] setFrame:displayFrame display:NO animate:YES];		
     1.8 +		[[displayController window] setFrame:displayFrame display:NO animate:NO];		
     1.9  		return YES;
    1.10  	}
    1.11  
    1.12 @@ -368,7 +368,7 @@
    1.13  		if (NSContainsRect(screenFrame,displayFrame)) {
    1.14  			//The rect is on the screen! Try to reserve it.
    1.15  			if ([self reserveRect:displayFrame inScreen:preferredScreen forDisplayController:displayController]) {
    1.16 -				[[displayController window] setFrame:displayFrame display:NO animate:YES];		
    1.17 +				[[displayController window] setFrame:displayFrame display:NO animate:NO];		
    1.18  				free(usedRects);
    1.19  				return YES;
    1.20  			}
     2.1 --- a/Plugins/Displays/WebKit/GrowlWebKitWindowView.m	Sun Feb 07 07:31:50 2010 -0800
     2.2 +++ b/Plugins/Displays/WebKit/GrowlWebKitWindowView.m	Sun Feb 07 07:36:04 2010 -0800
     2.3 @@ -76,7 +76,7 @@
     2.4  	NSRect windowRect = [window frame];
     2.5  	windowRect.origin.y -= rect.size.height - windowRect.size.height;
     2.6  	windowRect.size = rect.size;
     2.7 -	[window setFrame:windowRect display:YES animate:YES];
     2.8 +	[window setFrame:windowRect display:YES animate:NO];
     2.9  
    2.10  	if (trackingRectTag)
    2.11  		[self removeTrackingRect:trackingRectTag];