vlc/vlc-2.0 | branch: master | Felix Paul Kühne <[email protected]> | Mon Mar 5 20:43:35 2012 +0100| [169f866b350d2ce0c4c25a738de7360510d9dbf4] | committer: Felix Paul Kühne
macosx: fixed aspect ratio and crop commands by removing a no longer needed hack (close #5921, close #6080) (cherry picked from commit 6460f5112b5fd825a89e9545a5a0977bd9d75089) > http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=169f866b350d2ce0c4c25a738de7360510d9dbf4 --- modules/gui/macosx/MainWindow.m | 43 --------------------------------------- 1 files changed, 0 insertions(+), 43 deletions(-) diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m index 5b14189..4452962 100644 --- a/modules/gui/macosx/MainWindow.m +++ b/modules/gui/macosx/MainWindow.m @@ -1946,49 +1946,6 @@ static VLCMainWindow *_o_sharedInstance = nil; /* fullscreenAnimation will be unlocked when animation ends */ } -/* Make sure setFrame gets executed on main thread especially if we are animating. - * (Thus we won't block the video output thread) */ -- (void)setFrame:(NSRect)frame display:(BOOL)display animate:(BOOL)animate -{ - struct { NSRect frame; BOOL display; BOOL animate;} args; - NSData *packedargs; - - args.frame = frame; - args.display = display; - args.animate = animate; - - packedargs = [NSData dataWithBytes:&args length:sizeof(args)]; - - [self performSelectorOnMainThread:@selector(setFrameOnMainThread:) - withObject: packedargs waitUntilDone: YES]; -} - -- (void)setFrameOnMainThread:(NSData*)packedargs -{ - struct args { NSRect frame; BOOL display; BOOL animate; } * args = (struct args*)[packedargs bytes]; - - if( args->animate ) - { - /* Make sure we don't block too long and set up a non blocking animation */ - NSDictionary * dict = [NSDictionary dictionaryWithObjectsAndKeys: - self, NSViewAnimationTargetKey, - [NSValue valueWithRect:[self frame]], NSViewAnimationStartFrameKey, - [NSValue valueWithRect:args->frame], NSViewAnimationEndFrameKey, nil]; - - NSViewAnimation * anim = [[NSViewAnimation alloc] initWithViewAnimations:[NSArray arrayWithObject:dict]]; - - [anim setAnimationBlockingMode: NSAnimationNonblocking]; - [anim setDuration: 0.4]; - [anim setFrameRate: 30]; - [anim startAnimation]; - - [anim release]; - } - else { - [super setFrame:args->frame display:args->display animate:args->animate]; - } -} - #pragma mark - #pragma mark Lion's native fullscreen handling - (void)windowWillEnterFullScreen:(NSNotification *)notification _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
