Commit 08159b75 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: don't resize the vout in case VLC is in fullscreen mode (fixes #5920)

parent ee6c4a29
...@@ -77,6 +77,8 @@ ...@@ -77,6 +77,8 @@
/* animate mode is only supported in >=10.4 */ /* animate mode is only supported in >=10.4 */
- (void)closeAndAnimate: (BOOL)animate; - (void)closeAndAnimate: (BOOL)animate;
- (BOOL)isFullscreen;
@end @end
......
...@@ -360,6 +360,11 @@ static NSMutableArray *blackoutWindows = NULL; ...@@ -360,6 +360,11 @@ static NSMutableArray *blackoutWindows = NULL;
[invoc invoke]; [invoc invoke];
} }
} }
- (BOOL)isFullscreen
{
return YES;
}
@end @end
/***************************************************************************** /*****************************************************************************
......
...@@ -47,12 +47,9 @@ ...@@ -47,12 +47,9 @@
#include <vlc_dialog.h> #include <vlc_dialog.h>
#include "opengl.h" #include "opengl.h"
#ifndef MAC_OS_X_VERSION_10_7 @interface NSWindow (VLCCustomCode)
enum { - (BOOL)isFullscreen;
NSApplicationPresentationFullScreen = (1 << 10), @end
NSApplicationPresentationAutoHideToolbar = (1 << 11)
};
#endif
/** /**
* Forward declarations * Forward declarations
...@@ -496,7 +493,7 @@ static void OpenglSwap(vlc_gl_t *gl) ...@@ -496,7 +493,7 @@ static void OpenglSwap(vlc_gl_t *gl)
*/ */
- (void)setWindowFrameWithValue:(NSValue *)value - (void)setWindowFrameWithValue:(NSValue *)value
{ {
if (!(NSAppKitVersionNumber >= 1115.2 && [NSApp currentSystemPresentationOptions] == NSApplicationPresentationFullScreen)) if (![[self window] isFullscreen])
{ {
NSRect frame = [value rectValue]; NSRect frame = [value rectValue];
if (frame.origin.x <= 0.0 && frame.origin.y <= 0.0) if (frame.origin.x <= 0.0 && frame.origin.y <= 0.0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment