Commit 169f866b authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: fixed aspect ratio and crop commands by removing a no longer needed...

macosx: fixed aspect ratio and crop commands by removing a no longer needed hack (close #5921, close #6080)
(cherry picked from commit 6460f5112b5fd825a89e9545a5a0977bd9d75089)
parent c070223c
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment