Commit 8fad0cd7 authored by David Fuhrmann's avatar David Fuhrmann

macosx: fix fullscreen button state in mainwindow

The button state now indicates if the next video will be started in
fullscreen, or there is already one video in fullscreen.
parent 354dcd7d
...@@ -383,6 +383,11 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -383,6 +383,11 @@ static VLCMainWindow *_o_sharedInstance = nil;
nativeVideoSize = screenSize; nativeVideoSize = screenSize;
[self resizeWindow]; [self resizeWindow];
} }
// update fs button to reflect state for next startup
if (var_InheritBool(pl_Get(VLCIntf), "fullscreen")) {
[o_controls_bar setFullscreenState:YES];
}
} }
#pragma mark - #pragma mark -
...@@ -718,6 +723,11 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -718,6 +723,11 @@ static VLCMainWindow *_o_sharedInstance = nil;
if (!b_nonembedded && !b_fullscreen && frameBeforePlayback.size.width > 0 && frameBeforePlayback.size.height > 0) if (!b_nonembedded && !b_fullscreen && frameBeforePlayback.size.width > 0 && frameBeforePlayback.size.height > 0)
[[self animator] setFrame:frameBeforePlayback display:YES]; [[self animator] setFrame:frameBeforePlayback display:YES];
// update fs button to reflect state for next startup
if (var_InheritBool(pl_Get(VLCIntf), "fullscreen")) {
[o_controls_bar setFullscreenState:YES];
}
[self makeFirstResponder: nil]; [self makeFirstResponder: nil];
if ([self level] != NSNormalWindowLevel) if ([self level] != NSNormalWindowLevel)
......
...@@ -542,6 +542,7 @@ ...@@ -542,6 +542,7 @@
if (o_controls_bar) if (o_controls_bar)
[o_controls_bar setFullscreenState:YES]; [o_controls_bar setFullscreenState:YES];
[[[VLCMainWindow sharedInstance] controlsBar] setFullscreenState:YES];
[[VLCMainWindow sharedInstance] recreateHideMouseTimer]; [[VLCMainWindow sharedInstance] recreateHideMouseTimer];
...@@ -696,6 +697,7 @@ ...@@ -696,6 +697,7 @@
if (o_controls_bar) if (o_controls_bar)
[o_controls_bar setFullscreenState:NO]; [o_controls_bar setFullscreenState:NO];
[[[VLCMainWindow sharedInstance] controlsBar] setFullscreenState:NO];
/* We always try to do so */ /* We always try to do so */
[NSScreen unblackoutScreens]; [NSScreen unblackoutScreens];
......
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