[vlc-commits] macosx: fix fullscreen button state in mainwindow
David Fuhrmann
git at videolan.org
Sat Nov 10 21:57:44 CET 2012
vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Sat Nov 10 21:55:24 2012 +0100| [8fad0cd726cefe262dd3065c818d703f4c70214f] | committer: 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.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8fad0cd726cefe262dd3065c818d703f4c70214f
---
modules/gui/macosx/MainWindow.m | 10 ++++++++++
modules/gui/macosx/Windows.m | 2 ++
2 files changed, 12 insertions(+)
diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index 438b352..9e649d4 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -383,6 +383,11 @@ static VLCMainWindow *_o_sharedInstance = nil;
nativeVideoSize = screenSize;
[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 -
@@ -718,6 +723,11 @@ static VLCMainWindow *_o_sharedInstance = nil;
if (!b_nonembedded && !b_fullscreen && frameBeforePlayback.size.width > 0 && frameBeforePlayback.size.height > 0)
[[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];
if ([self level] != NSNormalWindowLevel)
diff --git a/modules/gui/macosx/Windows.m b/modules/gui/macosx/Windows.m
index 10332e7..8800842 100644
--- a/modules/gui/macosx/Windows.m
+++ b/modules/gui/macosx/Windows.m
@@ -542,6 +542,7 @@
if (o_controls_bar)
[o_controls_bar setFullscreenState:YES];
+ [[[VLCMainWindow sharedInstance] controlsBar] setFullscreenState:YES];
[[VLCMainWindow sharedInstance] recreateHideMouseTimer];
@@ -696,6 +697,7 @@
if (o_controls_bar)
[o_controls_bar setFullscreenState:NO];
+ [[[VLCMainWindow sharedInstance] controlsBar] setFullscreenState:NO];
/* We always try to do so */
[NSScreen unblackoutScreens];
More information about the vlc-commits
mailing list