]> git.sesse.net Git - vlc/commitdiff
macosx: better check if we can open the new vout within the main window
authorDavid Fuhrmann <david.fuhrmann@googlemail.com>
Sat, 22 Feb 2014 22:47:55 +0000 (23:47 +0100)
committerDavid Fuhrmann <david.fuhrmann@googlemail.com>
Sat, 22 Feb 2014 22:52:42 +0000 (23:52 +0100)
fixes #9919

modules/gui/macosx/VLCVoutWindowController.h
modules/gui/macosx/VLCVoutWindowController.m

index 9787773556c3e851f0ee180040540edf49598973..77a7f7dc96724f22aeaa13019647c6e632e4d41f 100644 (file)
@@ -38,6 +38,8 @@
     // save the status level if at least one video window is on status level
     NSUInteger i_statusLevelWindowCounter;
     NSInteger i_currentWindowLevel;
+
+    BOOL b_mainwindow_has_video;
 }
 
 @property (readonly, nonatomic) NSInteger currentWindowLevel;
index a632edfdc7e50cfe7efdc8378724286985ba37f7..f46c77fd6e29b87a9182b7a5013504178019538f 100644 (file)
         [[VLCMainWindow sharedInstance] setNonembedded:YES];
         b_nonembedded = YES;
     } else {
-        if ((var_InheritBool(VLCIntf, "embedded-video") && !b_multiple_vout_windows)) {
+        if ((var_InheritBool(VLCIntf, "embedded-video") && !b_mainwindow_has_video)) {
             // setup embedded video
             o_vout_view = [[[VLCMainWindow sharedInstance] videoView] retain];
             o_new_video_window = [[VLCMainWindow sharedInstance] retain];
+            b_mainwindow_has_video = YES;
             b_nonembedded = NO;
         } else {
             // setup detached window with controls
         return;
     }
 
+    if ([o_window class] == [VLCMainWindow class])
+        b_mainwindow_has_video = NO;
+
     if ([o_window fullscreen] && ![[VLCMainWindow sharedInstance] nativeFullscreenMode])
         [o_window leaveFullscreen];