From e95ffe719ea420749656b77e073cf19b73959925 Mon Sep 17 00:00:00 2001 From: Berkus Decker Date: Thu, 23 Nov 2017 21:02:38 +0200 Subject: [PATCH] Fix deprecations --- Telegram/SourceFiles/platform/mac/main_window_mac.mm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Telegram/SourceFiles/platform/mac/main_window_mac.mm b/Telegram/SourceFiles/platform/mac/main_window_mac.mm index 423fcf48b..1fbea92df 100644 --- a/Telegram/SourceFiles/platform/mac/main_window_mac.mm +++ b/Telegram/SourceFiles/platform/mac/main_window_mac.mm @@ -162,7 +162,7 @@ void MainWindow::Private::setWindowBadge(const QString &str) { } void MainWindow::Private::initCustomTitle(NSWindow *window, NSView *view) { - [window setStyleMask:[window styleMask] | NSFullSizeContentViewWindowMask]; + [window setStyleMask:[window styleMask] | NSWindowStyleMaskFullSizeContentView]; [window setTitlebarAppearsTransparent:YES]; auto inner = [window contentLayoutRect]; auto full = [view frame]; @@ -198,7 +198,7 @@ void MainWindow::Private::enableShadow(WId winId) { bool MainWindow::Private::filterNativeEvent(void *event) { NSEvent *e = static_cast(event); - if (e && [e type] == NSSystemDefined && [e subtype] == SPSystemDefinedEventMediaKeys) { + if (e && [e type] == NSEventTypeSystemDefined && [e subtype] == SPSystemDefinedEventMediaKeys) { #ifndef OS_MAC_STORE // If event tap is not installed, handle events that reach the app instead if (![SPMediaKeyTap usesGlobalMediaKeyTap]) { @@ -226,7 +226,7 @@ MainWindow::MainWindow() void MainWindow::closeWithoutDestroy() { NSWindow *nsWindow = [reinterpret_cast(winId()) window]; - auto isFullScreen = (([nsWindow styleMask] & NSFullScreenWindowMask) == NSFullScreenWindowMask); + auto isFullScreen = (([nsWindow styleMask] & NSWindowStyleMaskFullScreen) == NSWindowStyleMaskFullScreen); if (isFullScreen) { _hideAfterFullScreenTimer.callOnce(kHideAfterFullscreenTimeoutMs); [nsWindow toggleFullScreen:nsWindow];