Commit c8bad308 authored by David Fuhrmann's avatar David Fuhrmann
Browse files

macosx: add missing deletate for blackout window hiding animation (fixes #9106)

parent bbaeca0a
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
@class VLCVoutView; @class VLCVoutView;
@interface VLCWindow : NSWindow @interface VLCWindow : NSWindow <NSAnimationDelegate>
{ {
BOOL b_canBecomeKeyWindow; BOOL b_canBecomeKeyWindow;
BOOL b_isset_canBecomeKeyWindow; BOOL b_isset_canBecomeKeyWindow;
......
...@@ -88,7 +88,9 @@ ...@@ -88,7 +88,9 @@
return; return;
} }
invoc = [NSInvocation invocationWithMethodSignature:[super methodSignatureForSelector:@selector(close)]]; // TODO this callback stuff does not work and is not needed
invoc = [[[NSInvocation alloc] init] autorelease];
[invoc setSelector:@selector(close)];
[invoc setTarget: self]; [invoc setTarget: self];
if (![self isVisible] || [self alphaValue] == 0.0) { if (![self isVisible] || [self alphaValue] == 0.0) {
...@@ -101,9 +103,10 @@ ...@@ -101,9 +103,10 @@
- (void)orderOut: (id)sender animate: (BOOL)animate - (void)orderOut: (id)sender animate: (BOOL)animate
{ {
NSInvocation *invoc = [NSInvocation invocationWithMethodSignature:[super methodSignatureForSelector:@selector(orderOut:)]]; NSInvocation *invoc = [[[NSInvocation alloc] init] autorelease];
[invoc setSelector:@selector(orderOut:)];
[invoc setTarget: self]; [invoc setTarget: self];
[invoc setArgument: sender atIndex: 0]; [invoc setArgument: sender atIndex: 2];
[self orderOut: sender animate: animate callback: invoc]; [self orderOut: sender animate: animate callback: invoc];
} }
...@@ -129,7 +132,8 @@ ...@@ -129,7 +132,8 @@
[anim setAnimationBlockingMode:NSAnimationNonblocking]; [anim setAnimationBlockingMode:NSAnimationNonblocking];
[anim setDuration:0.9]; [anim setDuration:0.9];
[anim setFrameRate:30]; [anim setFrameRate:30];
[anim setUserInfo: callback]; [anim setUserInfo:callback];
[anim setDelegate:self];
@synchronized(self) { @synchronized(self) {
current_anim = self->o_current_animation; current_anim = self->o_current_animation;
...@@ -182,6 +186,7 @@ ...@@ -182,6 +186,7 @@
[anim setAnimationBlockingMode:NSAnimationNonblocking]; [anim setAnimationBlockingMode:NSAnimationNonblocking];
[anim setDuration:0.5]; [anim setDuration:0.5];
[anim setFrameRate:30]; [anim setFrameRate:30];
[anim setDelegate:self];
@synchronized(self) { @synchronized(self) {
current_anim = self->o_current_animation; current_anim = self->o_current_animation;
...@@ -209,9 +214,10 @@ ...@@ -209,9 +214,10 @@
NSInvocation * invoc; NSInvocation * invoc;
[super orderOut: nil]; [super orderOut: nil];
[self setAlphaValue: 1.0]; [self setAlphaValue: 1.0];
if ((invoc = [anim userInfo])) if ((invoc = [anim userInfo])) {
[invoc invoke]; [invoc invoke];
} }
}
} }
- (VLCVoutView *)videoView - (VLCVoutView *)videoView
......
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