vlc | branch: master | David Fuhrmann <[email protected]> | Wed Feb 
15 15:14:30 2012 +0100| [f54b9825b022d1c81d734ed8ebad5fc16faba5af] | 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 <[email protected]>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f54b9825b022d1c81d734ed8ebad5fc16faba5af
---

 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 e818b00..051ad8d 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
 
 /*****************************************************************************

_______________________________________________
vlc-commits mailing list
[email protected]
http://mailman.videolan.org/listinfo/vlc-commits

Reply via email to