Commit c2b7fa23 authored by David Fuhrmann's avatar David Fuhrmann

add black view to detached video window in order to avoid transparent or grey flashes

parent 6dd9853c
...@@ -135,6 +135,8 @@ ...@@ -135,6 +135,8 @@
NSTimer *t_hide_mouse_timer; NSTimer *t_hide_mouse_timer;
VLCColorView * o_color_backdrop; VLCColorView * o_color_backdrop;
VLCColorView * o_detached_color_backdrop;
NSInteger i_originalLevel; NSInteger i_originalLevel;
NSRect previousSavedFrame; NSRect previousSavedFrame;
} }
......
...@@ -147,7 +147,10 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -147,7 +147,10 @@ static VLCMainWindow *_o_sharedInstance = nil;
- (void)dealloc - (void)dealloc
{ {
if (b_dark_interface) if (b_dark_interface)
{
[o_color_backdrop release]; [o_color_backdrop release];
[o_detached_color_backdrop release];
}
[[NSNotificationCenter defaultCenter] removeObserver: self]; [[NSNotificationCenter defaultCenter] removeObserver: self];
[o_sidebaritems release]; [o_sidebaritems release];
...@@ -565,6 +568,15 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -565,6 +568,15 @@ static VLCMainWindow *_o_sharedInstance = nil;
o_color_backdrop = [[VLCColorView alloc] initWithFrame: [o_split_view frame]]; o_color_backdrop = [[VLCColorView alloc] initWithFrame: [o_split_view frame]];
[[self contentView] addSubview: o_color_backdrop positioned: NSWindowBelow relativeTo: o_split_view]; [[self contentView] addSubview: o_color_backdrop positioned: NSWindowBelow relativeTo: o_split_view];
[o_color_backdrop setAutoresizingMask:NSViewHeightSizable | NSViewWidthSizable]; [o_color_backdrop setAutoresizingMask:NSViewHeightSizable | NSViewWidthSizable];
NSRect backdropFrame = [[o_detached_video_window contentView] bounds];
backdropFrame.origin.y = [o_detached_bottombar_view frame].size.height;
backdropFrame.size.height -= [o_detached_bottombar_view frame].size.height;
backdropFrame.size.height -= [o_detached_titlebar_view frame].size.height;
o_detached_color_backdrop = [[VLCColorView alloc] initWithFrame: backdropFrame];
[[o_detached_video_window contentView] addSubview: o_detached_color_backdrop positioned: NSWindowBelow relativeTo: nil];
[o_detached_color_backdrop setAutoresizingMask:NSViewHeightSizable | NSViewWidthSizable];
} }
else else
{ {
...@@ -2686,6 +2698,10 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -2686,6 +2698,10 @@ static VLCMainWindow *_o_sharedInstance = nil;
[self setHasShadow:NO]; [self setHasShadow:NO];
[self setHasShadow:YES]; [self setHasShadow:YES];
} }
else
{
[self setBackgroundColor: [NSColor blackColor]];
}
} }
- (IBAction)fullscreen:(id)sender - (IBAction)fullscreen:(id)sender
......
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