[vlc-commits] macosx: fix another wrong occurrence of the fspanel

David Fuhrmann git at videolan.org
Sun Feb 10 20:16:55 CET 2013


vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Sun Feb 10 20:03:37 2013 +0100| [8f38f673a4ae405c6d66106738b25bd9603a3ae6] | committer: David Fuhrmann

macosx: fix another wrong occurrence of the fspanel

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

 modules/gui/macosx/Windows.h |    7 +++++--
 modules/gui/macosx/Windows.m |    8 ++++++--
 modules/gui/macosx/intf.m    |    2 +-
 3 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/modules/gui/macosx/Windows.h b/modules/gui/macosx/Windows.h
index e15eadb..992a12b 100644
--- a/modules/gui/macosx/Windows.h
+++ b/modules/gui/macosx/Windows.h
@@ -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;
+ at property (readonly) BOOL enteringFullscreenTransition;
 
 - (void)setWindowLevel:(NSInteger)i_state;
 
diff --git a/modules/gui/macosx/Windows.m b/modules/gui/macosx/Windows.m
index e314f4b..20bb730 100644
--- a/modules/gui/macosx/Windows.m
+++ b/modules/gui/macosx/Windows.m
@@ -243,6 +243,7 @@
 
 @synthesize videoView=o_video_view;
 @synthesize controlsBar=o_controls_bar;
+ at synthesize enteringFullscreenTransition=b_entering_fullscreen_transition;
 
 #pragma mark -
 #pragma mark Init
@@ -527,7 +528,7 @@
         return proposedFrameSize;
 
     // needed when entering lion fullscreen mode
-    if ([self fullscreen])
+    if (b_entering_fullscreen_transition || [self fullscreen])
         return proposedFrameSize;
 
     if ([[VLCCoreInteraction sharedInstance] aspectRatioIsLocked]) {
@@ -598,7 +599,7 @@
     // workaround, see #6668
     [NSApp setPresentationOptions:(NSApplicationPresentationFullScreen | NSApplicationPresentationAutoHideDock | NSApplicationPresentationAutoHideMenuBar)];
 
-    [self setFullscreen: YES];
+    b_entering_fullscreen_transition = YES;
 
     var_SetBool(pl_Get(VLCIntf), "fullscreen", true);
 
@@ -641,6 +642,9 @@
     // 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];
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index bd4226d..7223d50 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -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];



More information about the vlc-commits mailing list