Commit cca37149 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: hide the mainwindow's black title bar when using Lion's fullscreen mode

parent c30858cf
...@@ -1492,6 +1492,21 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -1492,6 +1492,21 @@ static VLCMainWindow *_o_sharedInstance = nil;
[NSCursor setHiddenUntilMouseMoves: YES]; [NSCursor setHiddenUntilMouseMoves: YES];
b_fullscreen = YES; b_fullscreen = YES;
[o_fspanel setVoutWasUpdated: (int)[[self screen] displayID]]; [o_fspanel setVoutWasUpdated: (int)[[self screen] displayID]];
if (b_dark_interface)
{
[o_titlebar_view removeFromSuperviewWithoutNeedingDisplay];
NSRect winrect;
CGFloat f_titleBarHeight = [o_titlebar_view frame].size.height;
winrect = [self frame];
winrect.size.height = winrect.size.height - f_titleBarHeight;
[self setFrame: winrect display:NO animate:NO];
winrect = [o_split_view frame];
winrect.size.height = winrect.size.height + f_titleBarHeight;
[o_split_view setFrame: winrect];
}
} }
- (void)windowWillExitFullScreen:(NSNotification *)notification - (void)windowWillExitFullScreen:(NSNotification *)notification
...@@ -1500,6 +1515,24 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -1500,6 +1515,24 @@ static VLCMainWindow *_o_sharedInstance = nil;
[NSCursor setHiddenUntilMouseMoves: NO]; [NSCursor setHiddenUntilMouseMoves: NO];
[o_fspanel setNonActive: nil]; [o_fspanel setNonActive: nil];
b_fullscreen = NO; b_fullscreen = NO;
if (b_dark_interface)
{
NSRect winrect;
CGFloat f_titleBarHeight = [o_titlebar_view frame].size.height;
winrect = [self frame];
[o_titlebar_view setFrame: NSMakeRect( 0, winrect.size.height - f_titleBarHeight,
winrect.size.width, f_titleBarHeight )];
[[self contentView] addSubview: o_titlebar_view];
winrect.size.height = winrect.size.height + f_titleBarHeight;
[self setFrame: winrect display:NO animate:NO];
winrect = [o_split_view frame];
winrect.size.height = winrect.size.height - f_titleBarHeight;
[o_split_view setFrame: winrect];
[o_video_view setFrame: winrect];
}
} }
#pragma mark - #pragma mark -
......
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