[vlc-commits] macosx: proper use of presenation options, removal of an redundant if

David Fuhrmann git at videolan.org
Thu Feb 23 19:15:41 CET 2012


vlc/vlc-2.0 | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Thu Feb 23 18:47:45 2012 +0100| [d72b9383fed5a39fec3c237e6b4db23c67fef4e9] | committer: Felix Paul Kühne

macosx: proper use of presenation options, removal of an redundant if

Signed-off-by: Felix Paul Kühne <fkuehne at videolan.org>
(cherry picked from commit 5e732fcf3bb9758c8d78f03d9089a7f9be5949e9)

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

 modules/gui/macosx/MainWindow.m |    2 +-
 modules/gui/macosx/intf.m       |    2 +-
 modules/gui/macosx/misc.m       |   13 +++++--------
 3 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index 3f1a37b..0e6c416 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -1335,7 +1335,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
 
 - (void)resizeWindow
 {
-    if ( b_fullscreen || (OSX_LION && [NSApp presentationOptions] == NSApplicationPresentationFullScreen && b_nativeFullscreenMode) )
+    if ( b_fullscreen || (OSX_LION && [NSApp presentationOptions] & NSApplicationPresentationFullScreen && b_nativeFullscreenMode) )
         return;
 
     NSPoint topleftbase = NSMakePoint(0, [self frame].size.height);
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 35cc378..2f02acc 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -583,7 +583,7 @@ static VLCMain *_o_sharedMainInstance = nil;
 
     if (OSX_LION)
     {
-        if ([NSApp currentSystemPresentationOptions] == NSApplicationPresentationFullScreen)
+        if ([NSApp currentSystemPresentationOptions] & NSApplicationPresentationFullScreen)
             var_SetBool( p_playlist, "fullscreen", YES );
     }
 
diff --git a/modules/gui/macosx/misc.m b/modules/gui/macosx/misc.m
index 9b8bf0d..ec30358 100644
--- a/modules/gui/macosx/misc.m
+++ b/modules/gui/macosx/misc.m
@@ -144,15 +144,12 @@ static NSMutableArray *blackoutWindows = NULL;
         [blackoutWindows addObject: blackoutWindow];
         [blackoutWindow release];
 
-        if( [screen isMainScreen ] )
+        if( [screen isMainScreen] )
         {
-            if ([screen isMainScreen])
-            {
-                if (OSX_LEOPARD)
-                    SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
-                else
-                    [NSApp setPresentationOptions:(NSApplicationPresentationAutoHideDock | NSApplicationPresentationAutoHideMenuBar)];
-            }
+            if (OSX_LEOPARD)
+                SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
+            else
+                [NSApp setPresentationOptions:(NSApplicationPresentationAutoHideDock | NSApplicationPresentationAutoHideMenuBar)];
         }
     }
 }



More information about the vlc-commits mailing list