vlc/vlc-2.1 | branch: master | David Fuhrmann <[email protected]> | Sun Nov 10 15:25:01 2013 +0100| [e82c2e080d2939528d582930086648d0f1a233da] | committer: 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. (cherry picked from commit 627b5d8edcf2910b6abb0176cacaff87e622bff3) Signed-off-by: David Fuhrmann <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=e82c2e080d2939528d582930086648d0f1a233da --- modules/gui/macosx/VLCVoutWindowController.m | 2 +- modules/gui/macosx/Windows.m | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/modules/gui/macosx/VLCVoutWindowController.m b/modules/gui/macosx/VLCVoutWindowController.m index 67daa6a..fb934b8 100644 --- a/modules/gui/macosx/VLCVoutWindowController.m +++ b/modules/gui/macosx/VLCVoutWindowController.m @@ -286,7 +286,7 @@ if(i_level == NSStatusWindowLevel) { i_statusLevelWindowCounter++; // 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]; } else { if (i_statusLevelWindowCounter > 0) diff --git a/modules/gui/macosx/Windows.m b/modules/gui/macosx/Windows.m index f71799e..032ac24 100644 --- a/modules/gui/macosx/Windows.m +++ b/modules/gui/macosx/Windows.m @@ -465,12 +465,10 @@ if (var_InheritBool(VLCIntf, "video-wallpaper") || [self level] < NSNormalWindowLevel) return; - if (!b_fullscreen) + if (!b_fullscreen && !b_entering_fullscreen_transition) [self setLevel: i_state]; else { // 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; } } @@ -618,6 +616,11 @@ // workaround, see #6668 [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; var_SetBool(pl_Get(VLCIntf), "fullscreen", true); @@ -633,11 +636,6 @@ if ([self hasActiveVideo]) [[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) { [o_titlebar_view removeFromSuperviewWithoutNeedingDisplay]; @@ -890,6 +888,8 @@ [o_fullscreen_anim1 startAnimation]; /* fullscreenAnimation will be unlocked when animation ends */ + + b_entering_fullscreen_transition = YES; } - (void)hasBecomeFullscreen @@ -907,6 +907,7 @@ if ([self isVisible]) [self orderOut: self]; + b_entering_fullscreen_transition = NO; [self setFullscreen:YES]; } _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
