Commit 4a354598 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: make sure that the fullscreen window is the main window (close #6850)

With the previous impementation, VLCMainWindow will stay the main window in fullscreen and is accidently activated when closing utility panels.
(cherry picked from commit f2092e1069a7bd65b7a8a99f4da513d06b352d5a)
parent e77f9d4e
......@@ -1721,6 +1721,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
[o_fullscreen_window setFullscreen: YES];
[o_fullscreen_window setBackgroundColor: [NSColor blackColor]];
[o_fullscreen_window setCanBecomeKeyWindow: YES];
[o_fullscreen_window setCanBecomeMainWindow: YES];
if (![o_videoWindow isVisible] || [o_videoWindow alphaValue] == 0.0)
{
......
......@@ -60,6 +60,8 @@
{
BOOL b_canBecomeKeyWindow;
BOOL b_isset_canBecomeKeyWindow;
BOOL b_canBecomeMainWindow;
BOOL b_isset_canBecomeMainWindow;
BOOL b_isFullscreen;
NSViewAnimation *animation;
}
......
......@@ -188,6 +188,7 @@ static NSMutableArray *blackoutWindows = NULL;
}
return self;
}
- (void)setCanBecomeKeyWindow: (BOOL)canBecomeKey
{
b_isset_canBecomeKeyWindow = YES;
......@@ -202,6 +203,20 @@ static NSMutableArray *blackoutWindows = NULL;
return [super canBecomeKeyWindow];
}
- (void)setCanBecomeMainWindow: (BOOL)canBecomeMain
{
b_isset_canBecomeMainWindow = YES;
b_canBecomeMainWindow = canBecomeMain;
}
- (BOOL)canBecomeMainWindow
{
if(b_isset_canBecomeMainWindow)
return b_canBecomeMainWindow;
return [super canBecomeMainWindow];
}
- (void)closeAndAnimate: (BOOL)animate
{
NSInvocation *invoc;
......
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