Commit 57df1568 authored by David Fuhrmann's avatar David Fuhrmann

macosx: only revert presentation options on fullscreen leave which are touched...

macosx: only revert presentation options on fullscreen leave which are touched when entering fs for this particular window

This fixes menu / dock hide behaviour when handling around with multiple
vout windows which are set to fullscreen on multiple monitors, especially when
leaving fullscreen for one window with other windows still in fullscreen state.
parent 138034ae
......@@ -930,7 +930,7 @@
}
[[[VLCMainWindow sharedInstance] fsPanel] setNonActive: nil];
[NSApp setPresentationOptions: NSApplicationPresentationDefault];
[[o_fullscreen_window screen] setNonFullscreenPresentationOptions];
/* Will release the lock */
[self hasEndedFullscreen];
......@@ -952,7 +952,7 @@
[[o_video_view window] orderFront: self];
[[[VLCMainWindow sharedInstance] fsPanel] setNonActive: nil];
[NSApp setPresentationOptions:(NSApplicationPresentationDefault)];
[[o_fullscreen_window screen] setNonFullscreenPresentationOptions];
if (o_fullscreen_anim1) {
[o_fullscreen_anim1 stopAnimation];
......
......@@ -65,6 +65,9 @@
- (CGDirectDisplayID)displayID;
- (void)blackoutOtherScreens;
+ (void)unblackoutScreens;
- (void)setFullscreenPresentationOptions;
- (void)setNonFullscreenPresentationOptions;
@end
......
......@@ -256,10 +256,9 @@ static NSMutableArray *blackoutWindows = NULL;
for (NSUInteger i = 0; i < blackoutWindowCount; i++) {
VLCWindow *blackoutWindow = [blackoutWindows objectAtIndex: i];
[[blackoutWindow screen] setNonFullscreenPresentationOptions];
[blackoutWindow closeAndAnimate: YES];
}
[NSApp setPresentationOptions:(NSApplicationPresentationDefault)];
}
- (void)setFullscreenPresentationOptions
......@@ -272,6 +271,16 @@ static NSMutableArray *blackoutWindows = NULL;
[NSApp setPresentationOptions:presentationOpts];
}
- (void)setNonFullscreenPresentationOptions
{
NSApplicationPresentationOptions presentationOpts = [NSApp presentationOptions];
if ([self hasMenuBar])
presentationOpts &= (~NSApplicationPresentationAutoHideMenuBar);
if ([self hasMenuBar] || [self hasDock])
presentationOpts &= (~NSApplicationPresentationAutoHideDock);
[NSApp setPresentationOptions:presentationOpts];
}
@end
/*****************************************************************************
......
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