[vlc-commits] macosx: make sure that isFullscreen only returns true in an actual fullscreen window
David Fuhrmann
git at videolan.org
Wed Feb 15 16:03:45 CET 2012
vlc/vlc-2.0 | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Wed Feb 15 15:14:30 2012 +0100| [5477b8a26f3f2e207866a961c334bd10f37dc47d] | committer: 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: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit f54b9825b022d1c81d734ed8ebad5fc16faba5af)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=5477b8a26f3f2e207866a961c334bd10f37dc47d
---
modules/gui/macosx/MainWindow.m | 1 +
modules/gui/macosx/misc.h | 3 +++
modules/gui/macosx/misc.m | 9 ++++++++-
3 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index 9c97cc3..74d2470 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -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];
diff --git a/modules/gui/macosx/misc.h b/modules/gui/macosx/misc.h
index c29b601..d7356d9 100644
--- a/modules/gui/macosx/misc.h
+++ b/modules/gui/macosx/misc.h
@@ -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
diff --git a/modules/gui/macosx/misc.m b/modules/gui/macosx/misc.m
index 5bca42c..98dc3ca 100644
--- a/modules/gui/macosx/misc.m
+++ b/modules/gui/macosx/misc.m
@@ -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
/*****************************************************************************
More information about the vlc-commits
mailing list