Commit 8f38f673 authored by David Fuhrmann's avatar David Fuhrmann

macosx: fix another wrong occurrence of the fspanel

parent 1c7a47c6
......@@ -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;
......
......@@ -243,6 +243,7 @@
@synthesize videoView=o_video_view;
@synthesize controlsBar=o_controls_bar;
@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];
......
......@@ -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];
......
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