]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/vout.m
gui/*macosx: Don't rely on carbon or on old non 64 bits API when possible.
[vlc] / modules / gui / macosx / vout.m
index 9027baf14de51cdb381c263233aef567eeac3d12..224ed25f48363f64ebd811760ee1966d488b9b16 100644 (file)
 
 /* prevent system sleep */
 #import <CoreServices/CoreServices.h>
-#import <CoreServices/../Frameworks/OSServices.framework/Headers/Power.h>
-
-/* SystemUIMode */
-#import <Carbon/Carbon.h>
 
 #include <vlc_keys.h>
 
@@ -1117,7 +1113,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
     [self setMovableByWindowBackground: NO];
 
     if( [screen isMainScreen] )
-        SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
+        [NSMenu setMenuBarVisible:NO];
 
     initialFrame = [self frame];
     [self setFrame:[screen frame] display:YES animate:YES];
@@ -1138,7 +1134,8 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
     [NSScreen unblackoutScreens];
 
     [[[[VLCMain sharedInstance] controls] fspanel] setNonActive: nil];
-    SetSystemUIMode( kUIModeNormal, kUIOptionAutoShowMenuBar);
+    [NSMenu setMenuBarVisible:YES];
+
     [self setFrame:initialFrame display:YES animate:YES];
     [self setMovableByWindowBackground: YES];
     if( var_GetBool( p_vout, "video-on-top" ) )