[vlc-commits] macosx: fixed aspect ratio and crop commands by removing a no longer needed hack ( close #5921, close #6080)

Felix Paul Kühne git at videolan.org
Mon Mar 5 20:43:40 CET 2012


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Mon Mar  5 20:43:35 2012 +0100| [6460f5112b5fd825a89e9545a5a0977bd9d75089] | committer: Felix Paul Kühne

macosx: fixed aspect ratio and crop commands by removing a no longer needed hack (close #5921, close #6080)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6460f5112b5fd825a89e9545a5a0977bd9d75089
---

 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 c9cfa3e..9b735ad 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



More information about the vlc-commits mailing list