Commit 1c89be66 authored by Felix Paul Kühne's avatar Felix Paul Kühne Committed by Jean-Baptiste Kempf

macosx: some improvements to the non-embedded vout window

(cherry picked from commit a7026d19)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 36b438b5
......@@ -396,6 +396,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
[self setBackgroundColor: [NSColor clearColor]];
[self setOpaque: NO];
[self setHasShadow:YES];
NSRect winrect;
CGFloat f_titleBarHeight = [o_titlebar_view frame].size.height;
......@@ -430,6 +431,8 @@ static VLCMainWindow *_o_sharedInstance = nil;
if (OSX_LEOPARD)
[o_time_sld_fancygradient_view removeFromSuperviewWithoutNeedingDisplay];
[[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(someWindowWillClose:) name: NSWindowWillCloseNotification object: nil];
}
#pragma mark -
......@@ -700,6 +703,8 @@ static VLCMainWindow *_o_sharedInstance = nil;
{
if (b_dark_interface)
[o_titlebar_view setWindowTitle: title];
if (b_nonembedded && [[VLCMain sharedInstance] activeVideoPlayback])
[o_nonembedded_window setTitle: title];
[super setTitle: title];
}
......@@ -1069,11 +1074,12 @@ static VLCMainWindow *_o_sharedInstance = nil;
}
else
{
[o_video_view removeFromSuperviewWithoutNeedingDisplay];
if ([o_video_view superview] != NULL)
[o_video_view removeFromSuperviewWithoutNeedingDisplay];
if (o_nonembedded_window)
[o_nonembedded_window release];
o_nonembedded_window = [[VLCWindow alloc] initWithContentRect:[o_video_view frame] styleMask: NSBorderlessWindowMask|NSResizableWindowMask backing:NSBackingStoreBuffered defer:YES];
o_nonembedded_window = [[VLCWindow alloc] initWithContentRect:[o_video_view frame] styleMask: NSTitledWindowMask|NSClosableWindowMask|NSResizableWindowMask|NSMiniaturizableWindowMask backing:NSBackingStoreBuffered defer:YES];
[o_nonembedded_window setFrame:[o_video_view frame] display:NO];
[o_nonembedded_window setBackgroundColor: [NSColor blackColor]];
[o_nonembedded_window setMovableByWindowBackground: YES];
......@@ -1187,6 +1193,12 @@ static VLCMainWindow *_o_sharedInstance = nil;
[NSCursor setHiddenUntilMouseMoves: YES];
}
- (void)someWindowWillClose:(NSNotification *)notification
{
if([notification object] == o_nonembedded_window)
[[VLCCoreInteraction sharedInstance] stop];
}
#pragma mark -
#pragma mark Fullscreen support
- (void)showFullscreenController
......
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