[vlc-devel] [PATCH] macosx: don't allow lion fullscreen in combination with nonembedded window
David Fuhrmann
david.fuhrmann at googlemail.com
Sat Feb 11 15:37:37 CET 2012
If you try to combine both features, you will end up in an fullscreen window with
playlist and overlayed video controls. Therefore make sure that both cannot be enabled
in simple prefs, and in case the user used advanced prefs, priorize nonembedded window
over the lion fullscreen.
---
modules/gui/macosx/MainWindow.m | 6 +++---
modules/gui/macosx/intf.m | 3 ++-
modules/gui/macosx/simple_prefs.m | 6 ++++++
3 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index 331c7cf..c41b146 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -122,10 +122,10 @@ static VLCMainWindow *_o_sharedInstance = nil;
- (void)awakeFromNib
{
/* setup the styled interface */
-#ifndef MAC_OS_X_VERSION_10_7
b_nativeFullscreenMode = NO;
-#else
- b_nativeFullscreenMode = config_GetInt( VLCIntf, "macosx-nativefullscreenmode" );
+#ifdef MAC_OS_X_VERSION_10_7
+ if( config_GetInt( VLCIntf, "embedded-video" ))
+ b_nativeFullscreenMode = config_GetInt( VLCIntf, "macosx-nativefullscreenmode" );
#endif
i_lastShownVolume = -1;
t_hide_mouse_timer = nil;
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 0d4b5e2..8171824 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -626,7 +626,8 @@ static VLCMain *_o_sharedMainInstance = nil;
/* yeah, we are done */
b_nativeFullscreenMode = NO;
#ifdef MAC_OS_X_VERSION_10_7
- b_nativeFullscreenMode = config_GetInt( p_intf, "macosx-nativefullscreenmode" );
+ if( config_GetInt( VLCIntf, "embedded-video" ))
+ b_nativeFullscreenMode = config_GetInt( p_intf, "macosx-nativefullscreenmode" );
#endif
nib_main_loaded = TRUE;
}
diff --git a/modules/gui/macosx/simple_prefs.m b/modules/gui/macosx/simple_prefs.m
index 78d816e..a5d1f90 100644
--- a/modules/gui/macosx/simple_prefs.m
+++ b/modules/gui/macosx/simple_prefs.m
@@ -1026,6 +1026,12 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch
- (IBAction)interfaceSettingChanged:(id)sender
{
+ if( sender == o_intf_embedded_ckb && [o_intf_embedded_ckb state] == NSOffState )
+ [o_intf_nativefullscreen_ckb setState: NSOffState];
+
+ if( sender == o_intf_nativefullscreen_ckb && [o_intf_nativefullscreen_ckb state] == NSOnState )
+ [o_intf_embedded_ckb setState: NSOnState];
+
b_intfSettingChanged = YES;
}
--
1.7.5.4
More information about the vlc-devel
mailing list