[vlc-commits] macosx: remove custom orderOut: implementation

David Fuhrmann git at videolan.org
Sat Mar 17 17:46:37 CET 2012


vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Sat Mar 17 16:42:04 2012 +0100| [80e730f1e4d67f4a00428220ed170d477c85032a] | committer: David Fuhrmann

macosx: remove custom orderOut: implementation

The if condition was only true in a very very rare case, and even then the code is
incorrect (e.g. when the detached window is in fullscreen and the user closes
the main window).

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

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

diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index 05d0e28..2718806 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -1636,10 +1636,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
     if (b_fullscreen)
     {
         /* Make sure we are hidden */
-        if( b_nonembedded )
-            [o_detached_video_window orderOut: self];
-        else
-            [super orderOut: self];
+        [o_videoWindow orderOut: self];
 
         [self unlockFullscreenAnimation];
         return;
@@ -1709,11 +1706,9 @@ static VLCMainWindow *_o_sharedInstance = nil;
     [o_fspanel setVoutWasUpdated: (int)[[o_fullscreen_window screen] displayID]];
     [o_fspanel setActive: nil];
 
-    if( !b_nonembedded && [self isVisible] )
-        [super orderOut: self];
-
-    if( b_nonembedded && [o_detached_video_window isVisible] )
-        [o_detached_video_window orderOut: self];
+    id o_videoWindow = b_nonembedded ? o_detached_video_window : self;
+    if( [o_videoWindow isVisible] )
+        [o_videoWindow orderOut: self];
 
     [o_fspanel setActive: nil];
 
@@ -1911,15 +1906,6 @@ static VLCMainWindow *_o_sharedInstance = nil;
     }
 }
 
-- (void)orderOut: (id)sender
-{
-    /* Make sure we leave fullscreen */
-    if (!(OSX_LION || !b_nativeFullscreenMode))
-        [self leaveFullscreenAndFadeOut: YES];
-
-    [super orderOut: sender];
-}
-
 - (void)makeKeyAndOrderFront: (id)sender
 {
     /* Hack



More information about the vlc-commits mailing list