tdevdraw: fix flashing during window drag - plan9port - [fork] Plan 9 from user space
 (HTM) git clone git://src.adamsgaard.dk/plan9port
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit cbcec5adb9cb2274f3c4e2f3a8f4926b2e9689e8
 (DIR) parent a2f6b810f5be2a233fc58762ccc009a15edabf8b
 (HTM) Author: Jeff Sickel <jas@corpus-callosum.com>
       Date:   Wed, 12 Jan 2011 00:54:22 -0500
       
       devdraw: fix flashing during window drag
       
       R=rsc
       CC=codebot
       http://codereview.appspot.com/3922043
       
       Diffstat:
         M src/cmd/devdraw/osx-screen-carbon.m |       2 +-
         M src/cmd/devdraw/osx-srv.m           |       6 ++++--
       
       2 files changed, 5 insertions(+), 3 deletions(-)
       ---
 (DIR) diff --git a/src/cmd/devdraw/osx-screen-carbon.m b/src/cmd/devdraw/osx-screen-carbon.m
       t@@ -525,7 +525,7 @@ eventhandler(EventHandlerCallRef next, EventRef event, void *arg)
                                exit(0);
                        
                        case kEventWindowBoundsChanged:
       -                        eresized(1);
       +                        eresized(0);
                                break;
                        
                        case kEventWindowDrawContent:
 (DIR) diff --git a/src/cmd/devdraw/osx-srv.m b/src/cmd/devdraw/osx-srv.m
       t@@ -121,7 +121,7 @@ main(int argc, char **argv)
        {
                NSAutoreleasePool *pool = nil;
                NSApplication *application = nil;
       -
       +        DevdrawDelegate *app = nil;
                /*
                 * Move the protocol off stdin/stdout so that
                 * any inadvertent prints don't screw things up.
       t@@ -152,9 +152,11 @@ main(int argc, char **argv)
        
                pool = [[NSAutoreleasePool alloc] init];
                application = [NSApplication sharedApplication];
       -        [application setDelegate:[[DevdrawDelegate alloc] init]];
       +        app = [[DevdrawDelegate alloc] init];
       +        [application setDelegate:app];
                [application run];
                [application setDelegate:nil];
       +        [app release];
                [pool release];
                return 0;
        }