[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:06:32 CET 2012
vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sun Feb 5 22:37:27 2012 +0100| [08159b75912049c454e8abd01d9be7873e494b35] | committer: Felix Paul Kühne
macosx: don't resize the vout in case VLC is in fullscreen mode (fixes #5920)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=08159b75912049c454e8abd01d9be7873e494b35
---
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 6c0d241..d771721 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