[vlc-commits] macosx: fixed corner case, which could lead to an empty main window in case the video output closes prematurely

Felix Paul Kühne git at videolan.org
Thu May 17 02:37:29 CEST 2012


vlc/vlc-2.0 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Thu May 17 02:33:22 2012 +0200| [c84bdbdc42c91b8bb393687271c2d77eaf08cad7] | committer: Felix Paul Kühne

macosx: fixed corner case, which could lead to an empty main window in case the video output closes prematurely
(cherry picked from commit 5c165066e19c1935de7abd8142deab531c0265ac)

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

 modules/gui/macosx/MainWindow.m |    3 ++-
 modules/gui/macosx/intf.m       |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index cd98330..0792226 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -727,7 +727,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
     if( b_nativeFullscreenMode && b_fullscreen && b_activeVideo && sender != nil )
         return;
 
-    if (b_dropzone_active && !b_activeVideo && ([[NSApp currentEvent] modifierFlags] & NSAlternateKeyMask) != 0)
+    if (b_dropzone_active && ([[NSApp currentEvent] modifierFlags] & NSAlternateKeyMask) != 0)
     {
         b_dropzone_active = NO;
         [self hideDropZone];
@@ -1148,6 +1148,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
 
 - (void)hideDropZone
 {
+    b_dropzone_active = NO;
     [o_dropzone_view removeFromSuperview];
     [[o_playlist_table animator] setHidden: NO];
 }
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 74d0121..7cd491b 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -1737,7 +1737,7 @@ unsigned int CocoaKeyToVLC( unichar i_key )
     b_active_videoplayback = b_value;
     if( o_mainwindow )
     {
-        [o_mainwindow performSelectorOnMainThread:@selector(setVideoplayEnabled) withObject:nil waitUntilDone:NO];
+        [o_mainwindow performSelectorOnMainThread:@selector(setVideoplayEnabled) withObject:nil waitUntilDone:YES];
         [o_mainwindow performSelectorOnMainThread:@selector(togglePlaylist:) withObject:nil waitUntilDone:NO];
     }
 }



More information about the vlc-commits mailing list