[vlc-commits] macosx: better check if we can open the new vout within the main window

David Fuhrmann git at videolan.org
Sat Feb 22 23:52:53 CET 2014


vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Sat Feb 22 23:47:55 2014 +0100| [65c4bea632e2648113d1775b98826689f148a4b7] | committer: David Fuhrmann

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

fixes #9919

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=65c4bea632e2648113d1775b98826689f148a4b7
---

 modules/gui/macosx/VLCVoutWindowController.h |    2 ++
 modules/gui/macosx/VLCVoutWindowController.m |    6 +++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/modules/gui/macosx/VLCVoutWindowController.h b/modules/gui/macosx/VLCVoutWindowController.h
index 9787773..77a7f7d 100644
--- a/modules/gui/macosx/VLCVoutWindowController.h
+++ b/modules/gui/macosx/VLCVoutWindowController.h
@@ -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;
diff --git a/modules/gui/macosx/VLCVoutWindowController.m b/modules/gui/macosx/VLCVoutWindowController.m
index a632edf..f46c77f 100644
--- a/modules/gui/macosx/VLCVoutWindowController.m
+++ b/modules/gui/macosx/VLCVoutWindowController.m
@@ -129,10 +129,11 @@
         [[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
@@ -243,6 +244,9 @@
         return;
     }
 
+    if ([o_window class] == [VLCMainWindow class])
+        b_mainwindow_has_video = NO;
+
     if ([o_window fullscreen] && ![[VLCMainWindow sharedInstance] nativeFullscreenMode])
         [o_window leaveFullscreen];
 



More information about the vlc-commits mailing list