Commit 86089eb0 authored by David Fuhrmann's avatar David Fuhrmann

macosx: Fix hiding of controls bar in native fullscreen

Introduce helper methods to hide and unhide the controls bar
correctly in all cases.
parent 99bd6c02
......@@ -783,11 +783,11 @@ static const float f_min_window_height = 307.;
}
if (self.nativeFullscreenMode) {
if ([self hasActiveVideo] && [self fullscreen]) {
[[self.controlsBar bottomBarView] setHidden: b_videoPlayback];
if ([self hasActiveVideo] && [self fullscreen] && b_videoPlayback) {
[self hideControlsBar];
[self.fspanel setActive];
} else {
[[self.controlsBar bottomBarView] setHidden: NO];
[self showControlsBar];
[self.fspanel setNonActive];
}
}
......
......@@ -86,6 +86,9 @@ static const float f_min_video_height = 70.0;
- (void)leaveFullscreenWithAnimation:(BOOL)b_animation;
/* lion fullscreen handling */
- (void)hideControlsBar;
- (void)showControlsBar;
- (void)windowWillEnterFullScreen:(NSNotification *)notification;
- (void)windowDidEnterFullScreen:(NSNotification *)notification;
- (void)windowWillExitFullScreen:(NSNotification *)notification;
......
......@@ -595,6 +595,18 @@
#pragma mark -
#pragma mark Lion native fullscreen handling
- (void)hideControlsBar
{
[[self.controlsBar bottomBarView] setHidden: YES];
self.videoViewBottomConstraint.priority = 1;
}
- (void)showControlsBar
{
[[self.controlsBar bottomBarView] setHidden: NO];
self.videoViewBottomConstraint.priority = 999;
}
- (void)becomeKeyWindow
{
[super becomeKeyWindow];
......@@ -695,8 +707,7 @@
}
if (![_videoView isHidden]) {
[[self.controlsBar bottomBarView] setHidden: YES];
self.videoViewBottomConstraint.priority = 1;
[self hideControlsBar];
}
[self setMovableByWindowBackground: NO];
......@@ -755,8 +766,7 @@
}
if (![_videoView isHidden]) {
[[self.controlsBar bottomBarView] setHidden: NO];
self.videoViewBottomConstraint.priority = 999;
[self showControlsBar];
}
[self setMovableByWindowBackground: YES];
......
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