[vlc-commits] macosx: remove custom orderOut: implementation
David Fuhrmann
git at videolan.org
Sat Mar 17 17:48:18 CET 2012
vlc/vlc-2.0 | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Sat Mar 17 16:42:04 2012 +0100| [337eb191da7ebaa78e66bf229f53202e35b6039a] | 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).
(cherry picked from commit 80e730f1e4d67f4a00428220ed170d477c85032a)
Signed-off-by: David Fuhrmann <david.fuhrmann at googlemail.com>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=337eb191da7ebaa78e66bf229f53202e35b6039a
---
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 4f56a2f..e8eacb7 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