Commit 627b5d8e authored by David Fuhrmann's avatar David Fuhrmann

macosx: fix float-on-top behaviour with fullscreen

The issues were mostly noticable if you select both float-on-top
and fullscreen in video prefs.
parent 04e57be4
...@@ -286,7 +286,7 @@ ...@@ -286,7 +286,7 @@
if(i_level == NSStatusWindowLevel) { if(i_level == NSStatusWindowLevel) {
i_statusLevelWindowCounter++; i_statusLevelWindowCounter++;
// window level need to stay on normal in fullscreen mode // window level need to stay on normal in fullscreen mode
if (![o_window fullscreen]) if (![o_window fullscreen] && ![o_window enteringFullscreenTransition])
[self updateWindowLevelForHelperWindows:i_level]; [self updateWindowLevelForHelperWindows:i_level];
} else { } else {
if (i_statusLevelWindowCounter > 0) if (i_statusLevelWindowCounter > 0)
......
...@@ -465,12 +465,10 @@ ...@@ -465,12 +465,10 @@
if (var_InheritBool(VLCIntf, "video-wallpaper") || [self level] < NSNormalWindowLevel) if (var_InheritBool(VLCIntf, "video-wallpaper") || [self level] < NSNormalWindowLevel)
return; return;
if (!b_fullscreen) if (!b_fullscreen && !b_entering_fullscreen_transition)
[self setLevel: i_state]; [self setLevel: i_state];
else { else {
// only save it for restore // only save it for restore
// TODO this does not handle the case when level is
// changed in the middle of a fullscreen animation
i_originalLevel = i_state; i_originalLevel = i_state;
} }
} }
...@@ -618,6 +616,11 @@ ...@@ -618,6 +616,11 @@
// workaround, see #6668 // workaround, see #6668
[NSApp setPresentationOptions:(NSApplicationPresentationFullScreen | NSApplicationPresentationAutoHideDock | NSApplicationPresentationAutoHideMenuBar)]; [NSApp setPresentationOptions:(NSApplicationPresentationFullScreen | NSApplicationPresentationAutoHideDock | NSApplicationPresentationAutoHideMenuBar)];
i_originalLevel = [self level];
// b_fullscreen and b_entering_fullscreen_transition must not be true yet
[[[VLCMain sharedInstance] voutController] updateWindowLevelForHelperWindows: NSNormalWindowLevel];
[self setLevel:NSNormalWindowLevel];
b_entering_fullscreen_transition = YES; b_entering_fullscreen_transition = YES;
var_SetBool(pl_Get(VLCIntf), "fullscreen", true); var_SetBool(pl_Get(VLCIntf), "fullscreen", true);
...@@ -633,11 +636,6 @@ ...@@ -633,11 +636,6 @@
if ([self hasActiveVideo]) if ([self hasActiveVideo])
[[VLCMainWindow sharedInstance] recreateHideMouseTimer]; [[VLCMainWindow sharedInstance] recreateHideMouseTimer];
i_originalLevel = [self level];
// b_fullscreen must not be true yet
[[[VLCMain sharedInstance] voutController] updateWindowLevelForHelperWindows: NSNormalWindowLevel];
[self setLevel:NSNormalWindowLevel];
if (b_dark_interface) { if (b_dark_interface) {
[o_titlebar_view removeFromSuperviewWithoutNeedingDisplay]; [o_titlebar_view removeFromSuperviewWithoutNeedingDisplay];
...@@ -890,6 +888,8 @@ ...@@ -890,6 +888,8 @@
[o_fullscreen_anim1 startAnimation]; [o_fullscreen_anim1 startAnimation];
/* fullscreenAnimation will be unlocked when animation ends */ /* fullscreenAnimation will be unlocked when animation ends */
b_entering_fullscreen_transition = YES;
} }
- (void)hasBecomeFullscreen - (void)hasBecomeFullscreen
...@@ -907,6 +907,7 @@ ...@@ -907,6 +907,7 @@
if ([self isVisible]) if ([self isVisible])
[self orderOut: self]; [self orderOut: self];
b_entering_fullscreen_transition = NO;
[self setFullscreen:YES]; [self setFullscreen:YES];
} }
......
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