Commit bb4e8b2d authored by Felix Paul Kühne's avatar Felix Paul Kühne

Fix ugly crashes related to the existing 'blackout screen' code

parent 96e55590
...@@ -70,7 +70,6 @@ ...@@ -70,7 +70,6 @@
* in middle of an animation, providing that the enter/leave functions * in middle of an animation, providing that the enter/leave functions
* are called from the same thread */ * are called from the same thread */
o_animation_lock = [[NSRecursiveLock alloc] init]; o_animation_lock = [[NSRecursiveLock alloc] init];
b_animation_lock_alreadylocked = NO;
} }
- (void)setTime:(NSString *)o_arg_time position:(float)f_position - (void)setTime:(NSString *)o_arg_time position:(float)f_position
...@@ -233,10 +232,6 @@ ...@@ -233,10 +232,6 @@
return; return;
} }
if (blackout_other_displays)
[screen blackoutOtherScreens]; /* We should do something like [screen blackoutOtherScreens]; */
b_animation_lock_alreadylocked = NO;
[self unlockFullscreenAnimation]; [self unlockFullscreenAnimation];
} }
...@@ -275,7 +270,6 @@ ...@@ -275,7 +270,6 @@
/* We always try to do so */ /* We always try to do so */
[NSScreen unblackoutScreens]; [NSScreen unblackoutScreens];
b_animation_lock_alreadylocked = NO;
[self unlockFullscreenAnimation]; [self unlockFullscreenAnimation];
return; return;
} }
...@@ -287,7 +281,7 @@ ...@@ -287,7 +281,7 @@
CGDisplayFade( token, 0.3, kCGDisplayBlendNormal, kCGDisplayBlendSolidColor, 0, 0, 0, YES ); CGDisplayFade( token, 0.3, kCGDisplayBlendNormal, kCGDisplayBlendSolidColor, 0, 0, 0, YES );
[[[[VLCMain sharedInstance] getControls] getFSPanel] setNonActive: nil]; [[[[VLCMain sharedInstance] getControls] getFSPanel] setNonActive: nil];
SetSystemUIMode( kUIModeNormal, kUIOptionAutoShowMenuBar); SetSystemUIMode( kUIModeNormal, 0);
/* We always try to do so */ /* We always try to do so */
[NSScreen unblackoutScreens]; [NSScreen unblackoutScreens];
...@@ -320,7 +314,6 @@ ...@@ -320,7 +314,6 @@
[o_fullscreen_window release]; [o_fullscreen_window release];
o_fullscreen_window = nil; o_fullscreen_window = nil;
b_animation_lock_alreadylocked = NO;
[self unlockFullscreenAnimation]; [self unlockFullscreenAnimation];
} }
......
...@@ -79,10 +79,9 @@ static NSMutableArray *blackoutWindows = NULL; ...@@ -79,10 +79,9 @@ static NSMutableArray *blackoutWindows = NULL;
unsigned int i; unsigned int i;
/* Free our previous blackout window (follow blackoutWindow alloc strategy) */ /* Free our previous blackout window (follow blackoutWindow alloc strategy) */
[blackoutWindows makeObjectsPerformSelector:@selector(close)]; [blackoutWindows makeObjectsPerformSelector:@selector(orderOut:)];
[blackoutWindows removeAllObjects]; [blackoutWindows removeAllObjects];
for(i = 0; i < [[NSScreen screens] count]; i++) for(i = 0; i < [[NSScreen screens] count]; i++)
{ {
NSScreen *screen = [[NSScreen screens] objectAtIndex: i]; NSScreen *screen = [[NSScreen screens] objectAtIndex: i];
...@@ -110,7 +109,7 @@ static NSMutableArray *blackoutWindows = NULL; ...@@ -110,7 +109,7 @@ static NSMutableArray *blackoutWindows = NULL;
[blackoutWindows addObject: blackoutWindow]; [blackoutWindows addObject: blackoutWindow];
[blackoutWindow release]; [blackoutWindow release];
if( [screen isMainScreen] ) if( [screen isMainScreen ] )
SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar); SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
} }
} }
...@@ -122,7 +121,7 @@ static NSMutableArray *blackoutWindows = NULL; ...@@ -122,7 +121,7 @@ static NSMutableArray *blackoutWindows = NULL;
for(i = 0; i < [blackoutWindows count]; i++) for(i = 0; i < [blackoutWindows count]; i++)
{ {
VLCWindow *blackoutWindow = [blackoutWindows objectAtIndex: i]; VLCWindow *blackoutWindow = [blackoutWindows objectAtIndex: i];
[blackoutWindow close]; [blackoutWindow orderOut: self];
} }
SetSystemUIMode( kUIModeNormal, 0); SetSystemUIMode( kUIModeNormal, 0);
......
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