[vlc-commits] macosx: fixed crash when closing the main window while using Lion' s native fullscreen mode

Felix Paul Kühne git at videolan.org
Fri Dec 23 02:04:13 CET 2011


vlc/vlc-1.2 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Fri Dec 23 00:45:54 2011 +0100| [fe8f6c937ad9eec86eb38f92c2bec89482e898b0] | committer: Jean-Baptiste Kempf

macosx: fixed crash when closing the main window while using Lion's native fullscreen mode
(cherry picked from commit 37c1667dd5022a3404775ee7657412e000462807)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/gui/macosx/MainWindow.m |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index c8ec264..cbf112f 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -1184,7 +1184,8 @@ static VLCMainWindow *_o_sharedInstance = nil;
     [o_fullscreen_btn setState: NO];
 
     /* We always try to do so */
-    [NSScreen unblackoutScreens];
+    if (!(OSX_LION && b_nativeFullscreenMode))
+        [NSScreen unblackoutScreens];
     vout_thread_t *p_vout = getVout();
     if (p_vout)
     {
@@ -1347,10 +1348,11 @@ static VLCMainWindow *_o_sharedInstance = nil;
 
 - (void)orderOut: (id)sender
 {
-    [super orderOut: sender];
-
     /* Make sure we leave fullscreen */
-    [self leaveFullscreenAndFadeOut: YES];
+    if (!(OSX_LION && b_nativeFullscreenMode))
+        [self leaveFullscreenAndFadeOut: YES];
+
+    [super orderOut: sender];
 }
 
 - (void)makeKeyAndOrderFront: (id)sender



More information about the vlc-commits mailing list