]> git.sesse.net Git - vlc/commitdiff
macosx: fixed menubar appearance in fullscreen mode by partially reverting [46c93c9cc...
authorFelix Paul Kühne <fkuehne@videolan.org>
Wed, 20 May 2009 16:22:39 +0000 (18:22 +0200)
committerFelix Paul Kühne <fkuehne@videolan.org>
Wed, 20 May 2009 16:24:15 +0000 (18:24 +0200)
There is no 64bit-save aka non-Carbon replacement for this feature yet.

Signed-off-by: Felix Paul Kühne <fkuehne@videolan.org>
modules/gui/macosx/embeddedwindow.m
modules/gui/macosx/vout.m
modules/gui/minimal_macosx/VLCMinimalVoutWindow.m

index adcec67b8314e8b72f9f145ed18d0d3af06b4ec7..b59ccf94b74d47259380b60762b9e92e7ee938fc 100644 (file)
@@ -32,6 +32,9 @@
 #import "embeddedwindow.h"
 #import "fspanel.h"
 
+/* SetSystemUIMode, ... */
+#import <Carbon/Carbon.h>
+
 /*****************************************************************************
  * VLCEmbeddedWindow Implementation
  *****************************************************************************/
             CGDisplayFade( token, 0.5, kCGDisplayBlendNormal, kCGDisplayBlendSolidColor, 0, 0, 0, YES );
  
             if ([screen isMainScreen])
-                [NSMenu setMenuBarVisible:NO];
+                SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
  
             [[self contentView] replaceSubview:o_view with:o_temp_view];
             [o_temp_view setFrame:[o_view frame]];
     }
  
     if ([screen isMainScreen])
-        [NSMenu setMenuBarVisible:NO];
+        SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
 
     dict1 = [[NSMutableDictionary alloc] initWithCapacity:2];
     dict2 = [[NSMutableDictionary alloc] initWithCapacity:3];
         CGDisplayFade( token, 0.3, kCGDisplayBlendNormal, kCGDisplayBlendSolidColor, 0, 0, 0, YES );
 
         [[[[VLCMain sharedInstance] controls] fspanel] setNonActive: nil];
-        [NSMenu setMenuBarVisible:YES];
+        SetSystemUIMode( kUIModeNormal, kUIOptionAutoShowMenuBar);
 
         /* Will release the lock */
         [self hasEndedFullscreen];
     [self orderFront: self];
 
     [[[[VLCMain sharedInstance] controls] fspanel] setNonActive: nil];
-    [NSMenu setMenuBarVisible:YES];
+    SetSystemUIMode( kUIModeNormal, kUIOptionAutoShowMenuBar);
 
     if (o_fullscreen_anim1)
     {
index 224ed25f48363f64ebd811760ee1966d488b9b16..add95df3b69e74bd9e9152b54cb7b8d1e2340792 100644 (file)
 
 /* prevent system sleep */
 #import <CoreServices/CoreServices.h>
+/* FIXME: HACK!! */
+#ifdef __x86_64__
+#import <CoreServices/../Frameworks/OSServices.framework/Headers/Power.h>
+#endif
+
+/* SystemUIMode */
+#import <Carbon/Carbon.h>
 
 #include <vlc_keys.h>
 
@@ -1113,7 +1120,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
     [self setMovableByWindowBackground: NO];
 
     if( [screen isMainScreen] )
-        [NSMenu setMenuBarVisible:NO];
+        SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
 
     initialFrame = [self frame];
     [self setFrame:[screen frame] display:YES animate:YES];
@@ -1134,7 +1141,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
     [NSScreen unblackoutScreens];
 
     [[[[VLCMain sharedInstance] controls] fspanel] setNonActive: nil];
-    [NSMenu setMenuBarVisible:YES];
+    SetSystemUIMode( kUIModeNormal, kUIOptionAutoShowMenuBar);
 
     [self setFrame:initialFrame display:YES animate:YES];
     [self setMovableByWindowBackground: YES];
index 8d998c9bf8a991607e72bcd236cc08a504e93380..f3357e0adc43d90c602cd45d74481a054a9a2f8c 100644 (file)
@@ -31,6 +31,9 @@
 
 #import <Cocoa/Cocoa.h>
 
+/* SetSystemUIMode, ... */
+#import <Carbon/Carbon.h>
+
 @implementation VLCMinimalVoutWindow
 - (id)initWithContentRect:(NSRect)contentRect
 {
 {
     fullscreen = YES;
     initialFrame = [self frame];
-    [NSMenu setMenuBarVisible:NO];
+    SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
     [self setFrame:[[self screen] frame] display:YES animate:YES];
 }
 
 - (void)leaveFullscreen
 {
     fullscreen = NO;
-    [NSMenu setMenuBarVisible:YES];
+    SetSystemUIMode( kUIModeNormal, kUIOptionAutoShowMenuBar);
     [self setFrame:initialFrame display:YES animate:YES];
 }