[vlc-commits] macosx: don't resize the vout in case VLC is in fullscreen mode ( fixes #5920)
Felix Paul Kühne
git at videolan.org
Mon Feb 6 00:10:36 CET 2012
vlc/vlc-2.0 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sun Feb 5 22:37:27 2012 +0100| [eafcec0aa35018cc5fa16c0f8465dcc1af8d9a69] | committer: Jean-Baptiste Kempf
macosx: don't resize the vout in case VLC is in fullscreen mode (fixes #5920)
(cherry picked from commit 08159b75912049c454e8abd01d9be7873e494b35)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=eafcec0aa35018cc5fa16c0f8465dcc1af8d9a69
---
modules/gui/macosx/misc.h | 2 ++
modules/gui/macosx/misc.m | 5 +++++
modules/video_output/macosx.m | 11 ++++-------
3 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/modules/gui/macosx/misc.h b/modules/gui/macosx/misc.h
index 65b9905..c29b601 100644
--- a/modules/gui/macosx/misc.h
+++ b/modules/gui/macosx/misc.h
@@ -77,6 +77,8 @@
/* animate mode is only supported in >=10.4 */
- (void)closeAndAnimate: (BOOL)animate;
+
+- (BOOL)isFullscreen;
@end
diff --git a/modules/gui/macosx/misc.m b/modules/gui/macosx/misc.m
index 623ae90..cc58b1c 100644
--- a/modules/gui/macosx/misc.m
+++ b/modules/gui/macosx/misc.m
@@ -360,6 +360,11 @@ static NSMutableArray *blackoutWindows = NULL;
[invoc invoke];
}
}
+
+- (BOOL)isFullscreen
+{
+ return YES;
+}
@end
/*****************************************************************************
diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m
index a68c82d..040c4ec 100644
--- a/modules/video_output/macosx.m
+++ b/modules/video_output/macosx.m
@@ -47,12 +47,9 @@
#include <vlc_dialog.h>
#include "opengl.h"
-#ifndef MAC_OS_X_VERSION_10_7
-enum {
- NSApplicationPresentationFullScreen = (1 << 10),
- NSApplicationPresentationAutoHideToolbar = (1 << 11)
-};
-#endif
+ at interface NSWindow (VLCCustomCode)
+- (BOOL)isFullscreen;
+ at end
/**
* Forward declarations
@@ -496,7 +493,7 @@ static void OpenglSwap(vlc_gl_t *gl)
*/
- (void)setWindowFrameWithValue:(NSValue *)value
{
- if (!(NSAppKitVersionNumber >= 1115.2 && [NSApp currentSystemPresentationOptions] == NSApplicationPresentationFullScreen))
+ if (![[self window] isFullscreen])
{
NSRect frame = [value rectValue];
if (frame.origin.x <= 0.0 && frame.origin.y <= 0.0)
More information about the vlc-commits
mailing list