Commit f54b9825 authored by David Fuhrmann's avatar David Fuhrmann Committed by Jean-Baptiste Kempf

macosx: make sure that isFullscreen only returns true in an actual fullscreen window

this fixes the issue that nonembedded window was not allowed to resize itself (e.g. after aspect ratio change)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent cf8441a2
......@@ -1378,6 +1378,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
rect.origin.x += [[o_video_view window] frame].origin.x;
rect.origin.y += [[o_video_view window] frame].origin.y;
o_fullscreen_window = [[VLCWindow alloc] initWithContentRect:rect styleMask: NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES];
[o_fullscreen_window setFullscreen: YES];
[o_fullscreen_window setBackgroundColor: [NSColor blackColor]];
[o_fullscreen_window setCanBecomeKeyWindow: YES];
......
......@@ -61,6 +61,7 @@
{
BOOL b_canBecomeKeyWindow;
BOOL b_isset_canBecomeKeyWindow;
BOOL b_isFullscreen;
NSViewAnimation *animation;
}
......@@ -78,6 +79,8 @@
/* animate mode is only supported in >=10.4 */
- (void)closeAndAnimate: (BOOL)animate;
- (void)setFullscreen:(BOOL)b_var;
- (BOOL)isFullscreen;
@end
......
......@@ -188,6 +188,7 @@ static NSMutableArray *blackoutWindows = NULL;
self = [super initWithContentRect:contentRect styleMask:styleMask backing:backingType defer:flag];
if( self )
{
b_isFullscreen = NO;
b_isset_canBecomeKeyWindow = NO;
/* we don't want this window to be restored on relaunch */
if (OSX_LION)
......@@ -361,10 +362,16 @@ static NSMutableArray *blackoutWindows = NULL;
}
}
- (void)setFullscreen:(BOOL)b_var
{
b_isFullscreen = b_var;
}
- (BOOL)isFullscreen
{
return YES;
return b_isFullscreen;
}
@end
/*****************************************************************************
......
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