[vlc-commits] macosx/video: replace API deprecated in 10.11
Felix Paul Kühne
git at videolan.org
Sun Feb 2 16:30:01 CET 2020
vlc | branch: master | Felix Paul Kühne <felix at feepk.net> | Fri Jan 31 13:05:23 2020 +0100| [ea32acb9c6cc8d1784f85ee2c471bc4c81336a4c] | committer: Felix Paul Kühne
macosx/video: replace API deprecated in 10.11
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ea32acb9c6cc8d1784f85ee2c471bc4c81336a4c
---
modules/gui/macosx/windows/video/VLCVideoOutputProvider.m | 8 ++++----
modules/gui/macosx/windows/video/VLCVideoWindowCommon.m | 12 ++++++------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/modules/gui/macosx/windows/video/VLCVideoOutputProvider.m b/modules/gui/macosx/windows/video/VLCVideoOutputProvider.m
index 9544c3e168..96a5ac53ed 100644
--- a/modules/gui/macosx/windows/video/VLCVideoOutputProvider.m
+++ b/modules/gui/macosx/windows/video/VLCVideoOutputProvider.m
@@ -314,7 +314,7 @@ int WindowOpen(vout_window_t *p_wnd)
NSSize videoViewSize = NSMakeSize(videoViewPosition.size.width, videoViewPosition.size.height);
// Avoid flashes if video will directly start in fullscreen
- NSDisableScreenUpdates();
+ [NSAnimationContext beginGrouping];
if (!videoWallpaper) {
// set (only!) window origin if specified
@@ -373,7 +373,7 @@ int WindowOpen(vout_window_t *p_wnd)
[self setFullscreen:1 forWindow:p_wnd withAnimation:NO];
}
- NSEnableScreenUpdates();
+ [NSAnimationContext endGrouping];
return voutView;
}
@@ -394,7 +394,7 @@ int WindowOpen(vout_window_t *p_wnd)
[videoWindow setHasActiveVideo: NO];
// prevent visible extra window if in fullscreen
- NSDisableScreenUpdates();
+ [NSAnimationContext beginGrouping];
BOOL b_native = var_InheritBool(getIntf(), "macosx-nativefullscreenmode");
// close fullscreen, without changing fullscreen vars
@@ -412,7 +412,7 @@ int WindowOpen(vout_window_t *p_wnd)
} else {
[(VLCLibraryWindow *)videoWindow disableVideoPlaybackAppearance];
}
- NSEnableScreenUpdates();
+ [NSAnimationContext endGrouping];
[_voutWindows removeObjectForKey:key];
if ([_voutWindows count] == 0) {
diff --git a/modules/gui/macosx/windows/video/VLCVideoWindowCommon.m b/modules/gui/macosx/windows/video/VLCVideoWindowCommon.m
index bf4a5188d2..049a5b0d27 100644
--- a/modules/gui/macosx/windows/video/VLCVideoWindowCommon.m
+++ b/modules/gui/macosx/windows/video/VLCVideoWindowCommon.m
@@ -640,13 +640,13 @@ NSString *VLCWindowShouldShowController = @"VLCWindowShouldShowController";
CGDisplayFade(token, 0.5, kCGDisplayBlendNormal, kCGDisplayBlendSolidColor, 0, 0, 0, YES);
}
- NSDisableScreenUpdates();
+ [NSAnimationContext beginGrouping];
[[_videoView superview] replaceSubview:_videoView with:o_temp_view];
[o_temp_view setFrame:[_videoView frame]];
[[o_fullscreen_window contentView] addSubview:_videoView];
[_videoView setFrame: [[o_fullscreen_window contentView] frame]];
[_videoView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
- NSEnableScreenUpdates();
+ [NSAnimationContext endGrouping];
[screen setFullscreenPresentationOptions];
@@ -668,7 +668,7 @@ NSString *VLCWindowShouldShowController = @"VLCWindowShouldShowController";
}
/* Make sure we don't see the _videoView disappearing of the screen during this operation */
- NSDisableScreenUpdates();
+ [NSAnimationContext beginGrouping];
[[_videoView superview] replaceSubview:_videoView with:o_temp_view];
[o_temp_view setFrame:[_videoView frame]];
[[o_fullscreen_window contentView] addSubview:_videoView];
@@ -676,7 +676,7 @@ NSString *VLCWindowShouldShowController = @"VLCWindowShouldShowController";
[_videoView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
[o_fullscreen_window makeKeyAndOrderFront:self];
- NSEnableScreenUpdates();
+ [NSAnimationContext endGrouping];
}
/* We are in fullscreen (and no animation is running) */
@@ -850,7 +850,7 @@ NSString *VLCWindowShouldShowController = @"VLCWindowShouldShowController";
/* This function is private and should be only triggered at the end of the fullscreen change animation */
/* Make sure we don't see the _videoView disappearing of the screen during this operation */
- NSDisableScreenUpdates();
+ [NSAnimationContext beginGrouping];
[_videoView removeFromSuperviewWithoutNeedingDisplay];
[[o_temp_view superview] replaceSubview:o_temp_view with:_videoView];
// TODO Replace tmpView by an existing view (e.g. middle view)
@@ -864,7 +864,7 @@ NSString *VLCWindowShouldShowController = @"VLCWindowShouldShowController";
[self makeKeyAndOrderFront:self];
[o_fullscreen_window orderOut: self];
- NSEnableScreenUpdates();
+ [NSAnimationContext endGrouping];
o_fullscreen_window = nil;
More information about the vlc-commits
mailing list