devdraw: fix flashing during window drag

R=rsc
CC=codebot
http://codereview.appspot.com/3922043
This commit is contained in:
Jeff Sickel 2011-01-12 00:54:22 -05:00 committed by Russ Cox
parent a2f6b810f5
commit cbcec5adb9
2 changed files with 5 additions and 3 deletions

View file

@ -525,7 +525,7 @@ eventhandler(EventHandlerCallRef next, EventRef event, void *arg)
exit(0); exit(0);
case kEventWindowBoundsChanged: case kEventWindowBoundsChanged:
eresized(1); eresized(0);
break; break;
case kEventWindowDrawContent: case kEventWindowDrawContent:

View file

@ -121,7 +121,7 @@ main(int argc, char **argv)
{ {
NSAutoreleasePool *pool = nil; NSAutoreleasePool *pool = nil;
NSApplication *application = nil; NSApplication *application = nil;
DevdrawDelegate *app = nil;
/* /*
* Move the protocol off stdin/stdout so that * Move the protocol off stdin/stdout so that
* any inadvertent prints don't screw things up. * any inadvertent prints don't screw things up.
@ -152,9 +152,11 @@ main(int argc, char **argv)
pool = [[NSAutoreleasePool alloc] init]; pool = [[NSAutoreleasePool alloc] init];
application = [NSApplication sharedApplication]; application = [NSApplication sharedApplication];
[application setDelegate:[[DevdrawDelegate alloc] init]]; app = [[DevdrawDelegate alloc] init];
[application setDelegate:app];
[application run]; [application run];
[application setDelegate:nil]; [application setDelegate:nil];
[app release];
[pool release]; [pool release];
return 0; return 0;
} }