diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt index 475a11ce5..ce7b615f6 100644 --- a/Telegram/CMakeLists.txt +++ b/Telegram/CMakeLists.txt @@ -891,8 +891,6 @@ PRIVATE platform/mac/specific_mac_p.h platform/mac/window_title_mac.mm platform/mac/window_title_mac.h - platform/mac/mac_touchbar.h - platform/mac/mac_touchbar.mm platform/win/audio_win.cpp platform/win/audio_win.h platform/win/file_utilities_win.cpp diff --git a/Telegram/SourceFiles/platform/mac/main_window_mac.mm b/Telegram/SourceFiles/platform/mac/main_window_mac.mm index 4e1b73baa..ec8699e87 100644 --- a/Telegram/SourceFiles/platform/mac/main_window_mac.mm +++ b/Telegram/SourceFiles/platform/mac/main_window_mac.mm @@ -26,7 +26,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "window/window_session_controller.h" #include "window/window_controller.h" #include "window/themes/window_theme.h" -#include "platform/mac/mac_touchbar.h" #include "platform/platform_notifications_manager.h" #include "base/platform/base_platform_info.h" #include "boxes/peer_list_controllers.h" @@ -144,9 +143,6 @@ public: void didExitFullScreen(); bool clipboardHasText(); -#ifndef OS_OSX - TouchBar *_touchBar = nil; -#endif // OS_OSX ~Private(); private: @@ -478,43 +474,11 @@ MainWindow::MainWindow(not_null controller) void MainWindow::initTouchBar() { #ifndef OS_OSX - if (!IsMac10_13OrGreater()) { - return; - } - [NSApplication sharedApplication] - .automaticCustomizeTouchBarMenuItemEnabled = true; - const auto createNewTouchBar = [=](not_null session) { - if (_private->_touchBar) { - return; - } - if (auto view = reinterpret_cast(winId())) { - _private->_touchBar = [[TouchBar alloc] - init:view - session:session]; - } - }; - - Core::App().domain().activeSessionChanges( - ) | rpl::start_with_next([=](Main::Session *session) { - if (session) { - if (_private->_touchBar) { - destroyCurrentTouchBar(); - } - createNewTouchBar(session); - } else { - destroyCurrentTouchBar(); - } - }, lifetime()); #endif // OS_OSX } void MainWindow::destroyCurrentTouchBar() { #ifndef OS_OSX - if (_private->_touchBar) { - [_private->_touchBar setTouchBar:Platform::TouchBarType::None]; - [_private->_touchBar release]; - } - _private->_touchBar = nil; #endif // OS_OSX } @@ -839,9 +803,6 @@ void MainWindow::updateGlobalMenuHook() { } #ifndef OS_OSX - if (_private->_touchBar) { - [_private->_touchBar showInputFieldItem:showTouchBarItem]; - } #endif // OS_OSX App::wnd()->updateIsActive();