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 @@
* in middle of an animation, providing that the enter/leave functions
* are called from the same thread */
o_animation_lock = [[NSRecursiveLock alloc] init];
b_animation_lock_alreadylocked = NO;
}
- (void)setTime:(NSString *)o_arg_time position:(float)f_position
......@@ -232,11 +231,7 @@
[self hasBecomeFullscreen];
return;
}
if (blackout_other_displays)
[screen blackoutOtherScreens]; /* We should do something like [screen blackoutOtherScreens]; */
b_animation_lock_alreadylocked = NO;
[self unlockFullscreenAnimation];
}
......@@ -274,8 +269,7 @@
{
/* We always try to do so */
[NSScreen unblackoutScreens];
b_animation_lock_alreadylocked = NO;
[self unlockFullscreenAnimation];
return;
}
......@@ -287,7 +281,7 @@
CGDisplayFade( token, 0.3, kCGDisplayBlendNormal, kCGDisplayBlendSolidColor, 0, 0, 0, YES );
[[[[VLCMain sharedInstance] getControls] getFSPanel] setNonActive: nil];
SetSystemUIMode( kUIModeNormal, kUIOptionAutoShowMenuBar);
SetSystemUIMode( kUIModeNormal, 0);
/* We always try to do so */
[NSScreen unblackoutScreens];
......@@ -320,7 +314,6 @@
[o_fullscreen_window release];
o_fullscreen_window = nil;
b_animation_lock_alreadylocked = NO;
[self unlockFullscreenAnimation];
}
......
......@@ -79,10 +79,9 @@ static NSMutableArray *blackoutWindows = NULL;
unsigned int i;
/* Free our previous blackout window (follow blackoutWindow alloc strategy) */
[blackoutWindows makeObjectsPerformSelector:@selector(close)];
[blackoutWindows makeObjectsPerformSelector:@selector(orderOut:)];
[blackoutWindows removeAllObjects];
for(i = 0; i < [[NSScreen screens] count]; i++)
{
NSScreen *screen = [[NSScreen screens] objectAtIndex: i];
......@@ -103,15 +102,15 @@ static NSMutableArray *blackoutWindows = NULL;
backing: NSBackingStoreBuffered defer: NO screen: screen];
[blackoutWindow setBackgroundColor:[NSColor blackColor]];
[blackoutWindow setLevel: NSFloatingWindowLevel]; /* Disappear when Expose is triggered */
[blackoutWindow displayIfNeeded];
[blackoutWindow orderFront: self];
[blackoutWindows addObject: blackoutWindow];
[blackoutWindow release];
if( [screen isMainScreen] )
SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
if( [screen isMainScreen ] )
SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
}
}
......@@ -122,10 +121,10 @@ static NSMutableArray *blackoutWindows = NULL;
for(i = 0; i < [blackoutWindows count]; i++)
{
VLCWindow *blackoutWindow = [blackoutWindows objectAtIndex: i];
[blackoutWindow close];
[blackoutWindow orderOut: self];
}
SetSystemUIMode( kUIModeNormal, 0);
SetSystemUIMode( kUIModeNormal, 0);
}
@end
......
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