[vlc-commits] [Git][videolan/vlc][master] macosx: replace deprecated NSWindowMask constants with NSWindowStyleMask
Steve Lhomme (@robUx4)
gitlab at videolan.org
Sat Apr 4 06:04:48 UTC 2026
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
f56c6128 by Serhii Bykov at 2026-04-04T05:44:00+00:00
macosx: replace deprecated NSWindowMask constants with NSWindowStyleMask
- - - - -
7 changed files:
- modules/gui/macosx/extensions/NSScreen+VLCAdditions.m
- modules/gui/macosx/library/VLCLibraryWindowSidebarRootViewController.m
- modules/gui/macosx/windows/extensions/VLCExtensionsDialogProvider.m
- modules/gui/macosx/windows/video/VLCVideoOutputProvider.m
- modules/gui/macosx/windows/video/VLCVideoWindowCommon.m
- modules/gui/minimal_macosx/VLCMinimalVoutWindow.m
- modules/video_output/window_macosx.m
Changes:
=====================================
modules/gui/macosx/extensions/NSScreen+VLCAdditions.m
=====================================
@@ -97,7 +97,7 @@ static NSMutableArray *blackoutWindows = NULL;
- The NSMutableArray blackoutWindows has the blackoutWindow references
- blackoutOtherDisplays is responsible for alloc/releasing its Windows
*/
- blackoutWindow = [[VLCWindow alloc] initWithContentRect: screen_rect styleMask: NSBorderlessWindowMask
+ blackoutWindow = [[VLCWindow alloc] initWithContentRect: screen_rect styleMask: NSWindowStyleMaskBorderless
backing: NSBackingStoreBuffered defer: NO screen: screen];
[blackoutWindow setBackgroundColor:[NSColor blackColor]];
[blackoutWindow setLevel: NSFloatingWindowLevel]; /* Disappear when Expose is triggered */
=====================================
modules/gui/macosx/library/VLCLibraryWindowSidebarRootViewController.m
=====================================
@@ -239,7 +239,7 @@
- (void)updateTopConstraints
{
CGFloat internalTopConstraintConstant = VLCLibraryUIUnits.smallSpacing;
- if (!self.mainVideoModeEnabled && self.libraryWindow.styleMask & NSFullSizeContentViewWindowMask) {
+ if (!self.mainVideoModeEnabled && self.libraryWindow.styleMask & NSWindowStyleMaskFullSizeContentView) {
// Compensate for full content view window's titlebar height, prevent top being cut off
internalTopConstraintConstant += self.libraryWindow.titlebarHeight;
}
=====================================
modules/gui/macosx/windows/extensions/VLCExtensionsDialogProvider.m
=====================================
@@ -471,7 +471,7 @@ static void extensionDialogCallback(extension_dialog_t *p_ext_dialog,
if (!shouldDestroy) {
NSRect content = NSMakeRect(0, 0, 1, 1);
dialogWindow = [[VLCDialogWindow alloc] initWithContentRect:content
- styleMask:NSTitledWindowMask | NSClosableWindowMask | NSResizableWindowMask
+ styleMask:NSWindowStyleMaskTitled | NSWindowStyleMaskClosable | NSWindowStyleMaskResizable
backing:NSBackingStoreBuffered
defer:NO];
[dialogWindow setReleasedWhenClosed:NO];
=====================================
modules/gui/macosx/windows/video/VLCVideoOutputProvider.m
=====================================
@@ -259,7 +259,7 @@ static int WindowFloatOnTop(vlc_object_t *obj,
}
NSRect window_rect = asVideoWallpaper ? screen.frame : mainInstance.libraryWindow.frame;
- NSUInteger mask = withWindowDecorations ? NSBorderlessWindowMask | NSResizableWindowMask : NSBorderlessWindowMask;
+ NSUInteger mask = withWindowDecorations ? NSWindowStyleMaskBorderless | NSWindowStyleMaskResizable : NSWindowStyleMaskBorderless;
VLCVideoWindowCommon *newVideoWindow = [[VLCVideoWindowCommon alloc] initWithContentRect:window_rect styleMask:mask backing:NSBackingStoreBuffered defer:YES];
newVideoWindow.delegate = newVideoWindow;
=====================================
modules/gui/macosx/windows/video/VLCVideoWindowCommon.m
=====================================
@@ -227,7 +227,7 @@ NSString *VLCWindowShouldShowController = @"VLCWindowShouldShowController";
- (void)window:window startCustomAnimationToEnterFullScreenWithDuration:(NSTimeInterval)duration
{
- [window setStyleMask:([window styleMask] | NSFullScreenWindowMask)];
+ [window setStyleMask:([window styleMask] | NSWindowStyleMaskFullScreen)];
NSScreen *screen = [window screen];
NSRect screenFrame = [screen frame];
@@ -240,7 +240,7 @@ NSString *VLCWindowShouldShowController = @"VLCWindowShouldShowController";
- (void)window:window startCustomAnimationToExitFullScreenWithDuration:(NSTimeInterval)duration
{
- [window setStyleMask:([window styleMask] & ~NSFullScreenWindowMask)];
+ [window setStyleMask:([window styleMask] & ~NSWindowStyleMaskFullScreen)];
[[window animator] setFrame:_frameBeforeLionFullscreen display:YES animate:YES];
[NSAnimationContext runAnimationGroup:^(NSAnimationContext *context) {
@@ -367,7 +367,7 @@ NSString *VLCWindowShouldShowController = @"VLCWindowShouldShowController";
rect = [[_videoViewController.view superview] convertRect: [_videoViewController.view frame] toView: nil]; /* Convert to Window base coord */
rect.origin.x += [self frame].origin.x;
rect.origin.y += [self frame].origin.y;
- o_fullscreen_window = [[VLCWindow alloc] initWithContentRect:rect styleMask: NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES];
+ o_fullscreen_window = [[VLCWindow alloc] initWithContentRect:rect styleMask: NSWindowStyleMaskBorderless backing:NSBackingStoreBuffered defer:YES];
[o_fullscreen_window setBackgroundColor: [NSColor blackColor]];
[o_fullscreen_window setCanBecomeKeyWindow: YES];
[o_fullscreen_window setCanBecomeMainWindow: YES];
=====================================
modules/gui/minimal_macosx/VLCMinimalVoutWindow.m
=====================================
@@ -34,7 +34,7 @@
- (id)initWithContentRect:(NSRect)contentRect
{
if( self = [super initWithContentRect:contentRect
- styleMask:NSBorderlessWindowMask
+ styleMask:NSWindowStyleMaskBorderless
backing:NSBackingStoreBuffered
defer:NO])
{
=====================================
modules/video_output/window_macosx.m
=====================================
@@ -359,7 +359,7 @@ NS_ASSUME_NONNULL_BEGIN
- (BOOL)isWindowFullscreen
{
- return ((self.window.styleMask & NSFullScreenWindowMask) == NSFullScreenWindowMask);
+ return ((self.window.styleMask & NSWindowStyleMaskFullScreen) == NSWindowStyleMaskFullScreen);
}
#pragma mark Module interactions
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/f56c6128cd990735489f9af1a0506d04a7669ccf
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/f56c6128cd990735489f9af1a0506d04a7669ccf
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list