Commit 63980c43 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: fixed menubar appearance in fullscreen mode by partially reverting...

macosx: fixed menubar appearance in fullscreen mode by partially reverting [46c93c9c]

There is no 64bit-save aka non-Carbon replacement for this feature yet.
Signed-off-by: default avatarFelix Paul Kühne <fkuehne@videolan.org>
parent fe19e10c
...@@ -32,6 +32,9 @@ ...@@ -32,6 +32,9 @@
#import "embeddedwindow.h" #import "embeddedwindow.h"
#import "fspanel.h" #import "fspanel.h"
/* SetSystemUIMode, ... */
#import <Carbon/Carbon.h>
/***************************************************************************** /*****************************************************************************
* VLCEmbeddedWindow Implementation * VLCEmbeddedWindow Implementation
*****************************************************************************/ *****************************************************************************/
...@@ -284,7 +287,7 @@ ...@@ -284,7 +287,7 @@
CGDisplayFade( token, 0.5, kCGDisplayBlendNormal, kCGDisplayBlendSolidColor, 0, 0, 0, YES ); CGDisplayFade( token, 0.5, kCGDisplayBlendNormal, kCGDisplayBlendSolidColor, 0, 0, 0, YES );
if ([screen isMainScreen]) if ([screen isMainScreen])
[NSMenu setMenuBarVisible:NO]; SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
[[self contentView] replaceSubview:o_view with:o_temp_view]; [[self contentView] replaceSubview:o_view with:o_temp_view];
[o_temp_view setFrame:[o_view frame]]; [o_temp_view setFrame:[o_view frame]];
...@@ -334,7 +337,7 @@ ...@@ -334,7 +337,7 @@
} }
if ([screen isMainScreen]) if ([screen isMainScreen])
[NSMenu setMenuBarVisible:NO]; SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
dict1 = [[NSMutableDictionary alloc] initWithCapacity:2]; dict1 = [[NSMutableDictionary alloc] initWithCapacity:2];
dict2 = [[NSMutableDictionary alloc] initWithCapacity:3]; dict2 = [[NSMutableDictionary alloc] initWithCapacity:3];
...@@ -424,7 +427,7 @@ ...@@ -424,7 +427,7 @@
CGDisplayFade( token, 0.3, kCGDisplayBlendNormal, kCGDisplayBlendSolidColor, 0, 0, 0, YES ); CGDisplayFade( token, 0.3, kCGDisplayBlendNormal, kCGDisplayBlendSolidColor, 0, 0, 0, YES );
[[[[VLCMain sharedInstance] controls] fspanel] setNonActive: nil]; [[[[VLCMain sharedInstance] controls] fspanel] setNonActive: nil];
[NSMenu setMenuBarVisible:YES]; SetSystemUIMode( kUIModeNormal, kUIOptionAutoShowMenuBar);
/* Will release the lock */ /* Will release the lock */
[self hasEndedFullscreen]; [self hasEndedFullscreen];
...@@ -442,7 +445,7 @@ ...@@ -442,7 +445,7 @@
[self orderFront: self]; [self orderFront: self];
[[[[VLCMain sharedInstance] controls] fspanel] setNonActive: nil]; [[[[VLCMain sharedInstance] controls] fspanel] setNonActive: nil];
[NSMenu setMenuBarVisible:YES]; SetSystemUIMode( kUIModeNormal, kUIOptionAutoShowMenuBar);
if (o_fullscreen_anim1) if (o_fullscreen_anim1)
{ {
......
...@@ -36,6 +36,13 @@ ...@@ -36,6 +36,13 @@
/* prevent system sleep */ /* prevent system sleep */
#import <CoreServices/CoreServices.h> #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> #include <vlc_keys.h>
...@@ -1113,7 +1120,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, ...@@ -1113,7 +1120,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
[self setMovableByWindowBackground: NO]; [self setMovableByWindowBackground: NO];
if( [screen isMainScreen] ) if( [screen isMainScreen] )
[NSMenu setMenuBarVisible:NO]; SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
initialFrame = [self frame]; initialFrame = [self frame];
[self setFrame:[screen frame] display:YES animate:YES]; [self setFrame:[screen frame] display:YES animate:YES];
...@@ -1134,7 +1141,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, ...@@ -1134,7 +1141,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
[NSScreen unblackoutScreens]; [NSScreen unblackoutScreens];
[[[[VLCMain sharedInstance] controls] fspanel] setNonActive: nil]; [[[[VLCMain sharedInstance] controls] fspanel] setNonActive: nil];
[NSMenu setMenuBarVisible:YES]; SetSystemUIMode( kUIModeNormal, kUIOptionAutoShowMenuBar);
[self setFrame:initialFrame display:YES animate:YES]; [self setFrame:initialFrame display:YES animate:YES];
[self setMovableByWindowBackground: YES]; [self setMovableByWindowBackground: YES];
......
...@@ -31,6 +31,9 @@ ...@@ -31,6 +31,9 @@
#import <Cocoa/Cocoa.h> #import <Cocoa/Cocoa.h>
/* SetSystemUIMode, ... */
#import <Carbon/Carbon.h>
@implementation VLCMinimalVoutWindow @implementation VLCMinimalVoutWindow
- (id)initWithContentRect:(NSRect)contentRect - (id)initWithContentRect:(NSRect)contentRect
{ {
...@@ -64,14 +67,14 @@ ...@@ -64,14 +67,14 @@
{ {
fullscreen = YES; fullscreen = YES;
initialFrame = [self frame]; initialFrame = [self frame];
[NSMenu setMenuBarVisible:NO]; SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
[self setFrame:[[self screen] frame] display:YES animate:YES]; [self setFrame:[[self screen] frame] display:YES animate:YES];
} }
- (void)leaveFullscreen - (void)leaveFullscreen
{ {
fullscreen = NO; fullscreen = NO;
[NSMenu setMenuBarVisible:YES]; SetSystemUIMode( kUIModeNormal, kUIOptionAutoShowMenuBar);
[self setFrame:initialFrame display:YES animate:YES]; [self setFrame:initialFrame display:YES animate:YES];
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment