Commit 5cc5daf2 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.
parent 40b48c5a
......@@ -32,6 +32,9 @@
#import "embeddedwindow.h"
#import "fspanel.h"
/* SetSystemUIMode, ... */
#import <Carbon/Carbon.h>
/*****************************************************************************
* VLCEmbeddedWindow Implementation
*****************************************************************************/
......@@ -284,7 +287,7 @@
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]];
......@@ -334,7 +337,7 @@
}
if ([screen isMainScreen])
[NSMenu setMenuBarVisible:NO];
SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
dict1 = [[NSMutableDictionary alloc] initWithCapacity:2];
dict2 = [[NSMutableDictionary alloc] initWithCapacity:3];
......@@ -424,7 +427,7 @@
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];
......@@ -442,7 +445,7 @@
[self orderFront: self];
[[[[VLCMain sharedInstance] controls] fspanel] setNonActive: nil];
[NSMenu setMenuBarVisible:YES];
SetSystemUIMode( kUIModeNormal, kUIOptionAutoShowMenuBar);
if (o_fullscreen_anim1)
{
......
......@@ -36,6 +36,13 @@
/* 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];
......
......@@ -31,6 +31,9 @@
#import <Cocoa/Cocoa.h>
/* SetSystemUIMode, ... */
#import <Carbon/Carbon.h>
@implementation VLCMinimalVoutWindow
- (id)initWithContentRect:(NSRect)contentRect
{
......@@ -64,14 +67,14 @@
{
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];
}
......
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