Commit 65c4bea6 authored by David Fuhrmann's avatar David Fuhrmann

macosx: better check if we can open the new vout within the main window

fixes #9919
parent 997fc467
...@@ -38,6 +38,8 @@ ...@@ -38,6 +38,8 @@
// save the status level if at least one video window is on status level // save the status level if at least one video window is on status level
NSUInteger i_statusLevelWindowCounter; NSUInteger i_statusLevelWindowCounter;
NSInteger i_currentWindowLevel; NSInteger i_currentWindowLevel;
BOOL b_mainwindow_has_video;
} }
@property (readonly, nonatomic) NSInteger currentWindowLevel; @property (readonly, nonatomic) NSInteger currentWindowLevel;
......
...@@ -129,10 +129,11 @@ ...@@ -129,10 +129,11 @@
[[VLCMainWindow sharedInstance] setNonembedded:YES]; [[VLCMainWindow sharedInstance] setNonembedded:YES];
b_nonembedded = YES; b_nonembedded = YES;
} else { } else {
if ((var_InheritBool(VLCIntf, "embedded-video") && !b_multiple_vout_windows)) { if ((var_InheritBool(VLCIntf, "embedded-video") && !b_mainwindow_has_video)) {
// setup embedded video // setup embedded video
o_vout_view = [[[VLCMainWindow sharedInstance] videoView] retain]; o_vout_view = [[[VLCMainWindow sharedInstance] videoView] retain];
o_new_video_window = [[VLCMainWindow sharedInstance] retain]; o_new_video_window = [[VLCMainWindow sharedInstance] retain];
b_mainwindow_has_video = YES;
b_nonembedded = NO; b_nonembedded = NO;
} else { } else {
// setup detached window with controls // setup detached window with controls
...@@ -243,6 +244,9 @@ ...@@ -243,6 +244,9 @@
return; return;
} }
if ([o_window class] == [VLCMainWindow class])
b_mainwindow_has_video = NO;
if ([o_window fullscreen] && ![[VLCMainWindow sharedInstance] nativeFullscreenMode]) if ([o_window fullscreen] && ![[VLCMainWindow sharedInstance] nativeFullscreenMode])
[o_window leaveFullscreen]; [o_window leaveFullscreen];
......
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