From 68fde210c68837d53d17a14c77531c61f9db48ec Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Mon, 22 Jun 2020 05:15:19 +0400 Subject: [PATCH] Platform::IsWayland could be used on any platform now --- Telegram/SourceFiles/core/application.cpp | 4 ---- .../SourceFiles/settings/settings_notifications.cpp | 11 +++-------- Telegram/lib_base | 2 +- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/Telegram/SourceFiles/core/application.cpp b/Telegram/SourceFiles/core/application.cpp index fb79b73251..80d871e666 100644 --- a/Telegram/SourceFiles/core/application.cpp +++ b/Telegram/SourceFiles/core/application.cpp @@ -773,13 +773,9 @@ void Application::notifyFileDialogShown(bool shown) { } QWidget *Application::getModalParent() { -#if defined Q_OS_UNIX && !defined Q_OS_MAC return Platform::IsWayland() ? App::wnd() : nullptr; -#endif // Q_OS_UNIX && !Q_OS_MAC - - return nullptr; } diff --git a/Telegram/SourceFiles/settings/settings_notifications.cpp b/Telegram/SourceFiles/settings/settings_notifications.cpp index e197c976a9..5f30627163 100644 --- a/Telegram/SourceFiles/settings/settings_notifications.cpp +++ b/Telegram/SourceFiles/settings/settings_notifications.cpp @@ -633,12 +633,7 @@ void SetupNotificationsContent( return QString(); } else if (Platform::IsWindows()) { return tr::lng_settings_use_windows(tr::now); - } else if (Platform::IsLinux()) { -#if defined Q_OS_UNIX && !defined Q_OS_MAC - if (Platform::IsWayland()) { - return QString(); - } -#endif // Q_OS_UNIX && !Q_OS_MAC + } else if (Platform::IsLinux() && !Platform::IsWayland()) { return tr::lng_settings_use_native_notifications(tr::now); } return QString(); @@ -656,9 +651,9 @@ void SetupNotificationsContent( }(); const auto advancedSlide = !Platform::IsMac10_8OrGreater() -#if defined Q_OS_UNIX && !defined Q_OS_MAC && !defined TDESKTOP_DISABLE_DBUS_INTEGRATION +#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION && !Platform::IsWayland() -#endif // Q_OS_UNIX && !Q_OS_MAC && !TDESKTOP_DISABLE_DBUS_INTEGRATION +#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION ? container->add( object_ptr>( container, diff --git a/Telegram/lib_base b/Telegram/lib_base index 18868e1634..3017da83c1 160000 --- a/Telegram/lib_base +++ b/Telegram/lib_base @@ -1 +1 @@ -Subproject commit 18868e1634d4f12727af93da1500108fc689981c +Subproject commit 3017da83c15e5e27244ab66526fea8cc3bddb7cf