[vlc-commits] macosx: don't allow lion fullscreen in combination with nonembedded window

David Fuhrmann git at videolan.org
Sat Feb 11 17:53:17 CET 2012


vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Sat Feb 11 15:37:37 2012 +0100| [051f8476664a5e329169d38ced11e6e47f96020e] | committer: Felix Paul Kühne

macosx: don't allow lion fullscreen in combination with nonembedded window

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.

Signed-off-by: Felix Paul Kühne <fkuehne at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=051f8476664a5e329169d38ced11e6e47f96020e
---

 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..ada1577 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 50d3ddb..b549ff1 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;
 }
 



More information about the vlc-commits mailing list