]> git.sesse.net Git - vlc/commitdiff
macosx: fix another wrong occurrence of the fspanel
authorDavid Fuhrmann <david.fuhrmann@googlemail.com>
Sun, 10 Feb 2013 19:03:37 +0000 (20:03 +0100)
committerDavid Fuhrmann <david.fuhrmann@googlemail.com>
Sun, 10 Feb 2013 19:16:06 +0000 (20:16 +0100)
modules/gui/macosx/Windows.h
modules/gui/macosx/Windows.m
modules/gui/macosx/intf.m

index e15eadba37a33df5009d4530d4233d06815945b4..992a12b19882bfa52a50a3e9c907873b668f547e 100644 (file)
@@ -44,8 +44,7 @@
     BOOL              b_has_active_video;
 
     /* 
-     * normal fullscreen: YES when all animations are over
-     * lion fullscreen:   toggled when fs animation starts
+     * YES when all animations are over
      * for fullscreen window: always YES
      */
     BOOL              b_fullscreen;
@@ -108,10 +107,14 @@ static const float f_min_video_height = 70.0;
     NSInteger i_originalLevel;
 
     NSTimer *t_hide_mouse_timer;
+
+    // true when the window is in transition for entering lion fullscreen
+    BOOL b_entering_fullscreen_transition;
 }
 
 @property (nonatomic, assign) VLCVoutView* videoView;
 @property (readonly) VLCControlsBarCommon* controlsBar;
+@property (readonly) BOOL enteringFullscreenTransition;
 
 - (void)setWindowLevel:(NSInteger)i_state;
 
index e314f4bffca213a619550545a2011ee22580c025..20bb73035ba0403fc2bee5e4f217695d7a998bab 100644 (file)
 
 @synthesize videoView=o_video_view;
 @synthesize controlsBar=o_controls_bar;
+@synthesize enteringFullscreenTransition=b_entering_fullscreen_transition;
 
 #pragma mark -
 #pragma mark Init
         return proposedFrameSize;
 
     // needed when entering lion fullscreen mode
-    if ([self fullscreen])
+    if (b_entering_fullscreen_transition || [self fullscreen])
         return proposedFrameSize;
 
     if ([[VLCCoreInteraction sharedInstance] aspectRatioIsLocked]) {
     // workaround, see #6668
     [NSApp setPresentationOptions:(NSApplicationPresentationFullScreen | NSApplicationPresentationAutoHideDock | NSApplicationPresentationAutoHideMenuBar)];
 
-    [self setFullscreen: YES];
+    b_entering_fullscreen_transition = YES;
 
     var_SetBool(pl_Get(VLCIntf), "fullscreen", true);
 
     // But this creates some problems when leaving fs over remote intfs, so activate app here.
     [NSApp activateIgnoringOtherApps:YES];
 
+    [self setFullscreen: YES];
+    b_entering_fullscreen_transition = NO;
+
     if ([self hasActiveVideo]) {
         [[[VLCMainWindow sharedInstance] fsPanel] setVoutWasUpdated: self];
         [[[VLCMainWindow sharedInstance] fsPanel] setActive: nil];
index bd4226d0c6943ab58f347ffb6fad34971f340ffc..7223d50ae8a9d0338f092825a94cb726a5bea5df 100644 (file)
@@ -1272,7 +1272,7 @@ static VLCMain *_o_sharedMainInstance = nil;
 
         // fullscreen might be triggered twice (vout event)
         // so ignore duplicate events here
-        if((b_fullscreen && ![o_active_window fullscreen]) ||
+        if((b_fullscreen && !([o_active_window fullscreen] || [o_active_window enteringFullscreenTransition])) ||
             (!b_fullscreen && [o_active_window fullscreen])) {
 
             [o_active_window toggleFullScreen:self];