Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 671893 Details for
Bug 753737
net-im/telegram-desktop-2.4.6 /7 make wayland support optional
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to include in FILESDIR
optional-wayland.patch (text/plain), 22.10 KB, created by
Esteve Varela Colominas
on 2020-11-17 14:42:08 UTC
(
hide
)
Description:
Patch to include in FILESDIR
Filename:
MIME Type:
Creator:
Esteve Varela Colominas
Created:
2020-11-17 14:42:08 UTC
Size:
22.10 KB
patch
obsolete
>diff --git a/cmake/external/CMakeLists.txt b/cmake/external/CMakeLists.txt >index 7cd03d6..dca143e 100644 >--- a/cmake/external/CMakeLists.txt >+++ b/cmake/external/CMakeLists.txt >@@ -35,7 +35,7 @@ endif() > add_checked_subdirectory(iconv) > add_checked_subdirectory(jpeg) > add_checked_subdirectory(lz4) >-if (LINUX) >+if (LINUX AND NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION) > add_checked_subdirectory(materialdecoration) > endif() > add_checked_subdirectory(minizip) >diff --git a/cmake/external/qt/package.cmake b/cmake/external/qt/package.cmake >index 62d2a09..60d92cc 100644 >--- a/cmake/external/qt/package.cmake >+++ b/cmake/external/qt/package.cmake >@@ -24,8 +24,10 @@ find_package(Qt5 COMPONENTS Core Gui Widgets Network REQUIRED) > find_package(Qt5Gui COMPONENTS QWebpPlugin REQUIRED) > > if (LINUX) >- find_package(Qt5 COMPONENTS WaylandClient REQUIRED) >- find_package(Qt5 OPTIONAL_COMPONENTS XkbCommonSupport QUIET) >+ if (NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION) >+ find_package(Qt5 COMPONENTS WaylandClient REQUIRED) >+ find_package(Qt5 OPTIONAL_COMPONENTS XkbCommonSupport QUIET) >+ endif() > > if (NOT DESKTOP_APP_USE_PACKAGED OR DESKTOP_APP_USE_PACKAGED_LAZY_PLATFORMTHEMES) > find_package(Qt5 COMPONENTS Svg REQUIRED) >diff --git a/cmake/options.cmake b/cmake/options.cmake >index 8d1c52b..89eea38 100644 >--- a/cmake/options.cmake >+++ b/cmake/options.cmake >@@ -26,6 +26,13 @@ if (DESKTOP_APP_DISABLE_DBUS_INTEGRATION) > ) > endif() > >+if (DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION) >+ target_compile_definitions(common_options >+ INTERFACE >+ DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION >+ ) >+endif() >+ > if (DESKTOP_APP_DISABLE_WEBRTC_INTEGRATION) > target_compile_definitions(common_options > INTERFACE >diff --git a/cmake/variables.cmake b/cmake/variables.cmake >index 4431fba..c30a1ca 100644 >--- a/cmake/variables.cmake >+++ b/cmake/variables.cmake >@@ -29,6 +29,7 @@ endif() > > option(DESKTOP_APP_LOTTIE_USE_CACHE "Use caching in lottie animations." ON) > option(DESKTOP_APP_DISABLE_DBUS_INTEGRATION "Disable all code for D-Bus integration (Linux only)." OFF) >+option(DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION "Disable all code for Wayland integration (Linux only)." OFF) > option(DESKTOP_APP_DISABLE_WEBRTC_INTEGRATION "Disable all code for WebRTC integration." OFF) > option(DESKTOP_APP_USE_GLIBC_WRAPS "Use wraps for new GLIBC features." OFF) > option(DESKTOP_APP_USE_PACKAGED "Find libraries using CMake instead of exact paths." ${no_special_target}) >diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml >index fdb5c5ca06..a7fcc60dd1 100644 >--- a/.github/workflows/linux.yml >+++ b/.github/workflows/linux.yml >@@ -54,6 +54,7 @@ jobs: > defines: > - "" > - "DESKTOP_APP_DISABLE_DBUS_INTEGRATION" >+ - "DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION" > - "TDESKTOP_DISABLE_GTK_INTEGRATION" > > env: >diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt >index 85f68e3781..ba9467ef20 100644 >--- a/Telegram/CMakeLists.txt >+++ b/Telegram/CMakeLists.txt >@@ -70,7 +70,6 @@ PRIVATE > if (LINUX) > target_link_libraries(Telegram > PRIVATE >- desktop-app::external_materialdecoration > desktop-app::external_nimf_qt5 > desktop-app::external_qt5ct_support > desktop-app::external_xcb_screensaver >@@ -89,14 +88,22 @@ if (LINUX) > ) > endif() > >- if (DESKTOP_APP_USE_PACKAGED AND Qt5WaylandClient_VERSION VERSION_LESS 5.13.0) >- find_package(PkgConfig REQUIRED) >- pkg_check_modules(WAYLAND_CLIENT REQUIRED wayland-client) >- >- target_include_directories(Telegram >+ if (NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION) >+ target_link_libraries(Telegram > PRIVATE >- ${WAYLAND_CLIENT_INCLUDE_DIRS} >+ desktop-app::external_materialdecoration > ) >+ >+ if (DESKTOP_APP_USE_PACKAGED >+ AND Qt5WaylandClient_VERSION VERSION_LESS 5.13.0) >+ find_package(PkgConfig REQUIRED) >+ pkg_check_modules(WAYLAND_CLIENT REQUIRED wayland-client) >+ >+ target_include_directories(Telegram >+ PRIVATE >+ ${WAYLAND_CLIENT_INCLUDE_DIRS} >+ ) >+ endif() > endif() > > if (NOT TDESKTOP_DISABLE_GTK_INTEGRATION) >@@ -796,6 +803,8 @@ PRIVATE > platform/linux/linux_gdk_helper.h > platform/linux/linux_libs.cpp > platform/linux/linux_libs.h >+ platform/linux/linux_wayland_integration.cpp >+ platform/linux/linux_wayland_integration.h > platform/linux/linux_xlib_helper.cpp > platform/linux/linux_xlib_helper.h > platform/linux/file_utilities_linux.cpp >@@ -808,6 +817,7 @@ PRIVATE > platform/linux/notifications_manager_linux.h > platform/linux/specific_linux.cpp > platform/linux/specific_linux.h >+ platform/linux/window_title_linux.cpp > platform/linux/window_title_linux.h > platform/mac/file_utilities_mac.mm > platform/mac/file_utilities_mac.h >@@ -1081,6 +1091,11 @@ if (NOT LINUX) > ) > endif() > >+if (LINUX AND DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION) >+ remove_target_sources(Telegram ${src_loc} platform/linux/linux_wayland_integration.cpp) >+ nice_target_sources(Telegram ${src_loc} PRIVATE platform/linux/linux_wayland_integration_dummy.cpp) >+endif() >+ > if (NOT DESKTOP_APP_USE_PACKAGED) > nice_target_sources(Telegram ${src_loc} PRIVATE platform/mac/mac_iconv_helper.c) > endif() >diff --git a/Telegram/SourceFiles/platform/linux/linux_wayland_integration.cpp b/Telegram/SourceFiles/platform/linux/linux_wayland_integration.cpp >new file mode 100644 >index 0000000000..e6af77b708 >--- /dev/null >+++ b/Telegram/SourceFiles/platform/linux/linux_wayland_integration.cpp >@@ -0,0 +1,117 @@ >+/* >+This file is part of Telegram Desktop, >+the official desktop application for the Telegram messaging service. >+ >+For license and copyright information please follow this link: >+https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL >+*/ >+#include "platform/linux/linux_wayland_integration.h" >+ >+#include "base/platform/base_platform_info.h" >+ >+#include <QtGui/QWindow> >+ >+#include <private/qwaylanddisplay_p.h> >+#include <private/qwaylandwindow_p.h> >+#include <private/qwaylandshellsurface_p.h> >+ >+#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0) && !defined DESKTOP_APP_QT_PATCHED >+#include <wayland-client.h> >+#endif // Qt < 5.13 && !DESKTOP_APP_QT_PATCHED >+ >+using QtWaylandClient::QWaylandWindow; >+ >+namespace Platform { >+namespace internal { >+ >+namespace { >+ >+#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0) && !defined DESKTOP_APP_QT_PATCHED >+enum wl_shell_surface_resize WlResizeFromEdges(Qt::Edges edges) { >+ if (edges == (Qt::TopEdge | Qt::LeftEdge)) >+ return WL_SHELL_SURFACE_RESIZE_TOP_LEFT; >+ if (edges == Qt::TopEdge) >+ return WL_SHELL_SURFACE_RESIZE_TOP; >+ if (edges == (Qt::TopEdge | Qt::RightEdge)) >+ return WL_SHELL_SURFACE_RESIZE_TOP_RIGHT; >+ if (edges == Qt::RightEdge) >+ return WL_SHELL_SURFACE_RESIZE_RIGHT; >+ if (edges == (Qt::RightEdge | Qt::BottomEdge)) >+ return WL_SHELL_SURFACE_RESIZE_BOTTOM_RIGHT; >+ if (edges == Qt::BottomEdge) >+ return WL_SHELL_SURFACE_RESIZE_BOTTOM; >+ if (edges == (Qt::BottomEdge | Qt::LeftEdge)) >+ return WL_SHELL_SURFACE_RESIZE_BOTTOM_LEFT; >+ if (edges == Qt::LeftEdge) >+ return WL_SHELL_SURFACE_RESIZE_LEFT; >+ >+ return WL_SHELL_SURFACE_RESIZE_NONE; >+} >+#endif // Qt < 5.13 && !DESKTOP_APP_QT_PATCHED >+ >+} // namespace >+ >+WaylandIntegration::WaylandIntegration() { >+} >+ >+WaylandIntegration *WaylandIntegration::Instance() { >+ if (!IsWayland()) return nullptr; >+ static WaylandIntegration instance; >+ return &instance; >+} >+ >+bool WaylandIntegration::startMove(QWindow *window) { >+ // There are startSystemMove on Qt 5.15 >+#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) && !defined DESKTOP_APP_QT_PATCHED >+ if (const auto waylandWindow = static_cast<QWaylandWindow*>( >+ window->handle())) { >+ if (const auto seat = waylandWindow->display()->lastInputDevice()) { >+ if (const auto shellSurface = waylandWindow->shellSurface()) { >+ return shellSurface->move(seat); >+ } >+ } >+ } >+#endif // Qt < 5.15 && !DESKTOP_APP_QT_PATCHED >+ >+ return false; >+} >+ >+bool WaylandIntegration::startResize(QWindow *window, Qt::Edges edges) { >+ // There are startSystemResize on Qt 5.15 >+#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) && !defined DESKTOP_APP_QT_PATCHED >+ if (const auto waylandWindow = static_cast<QWaylandWindow*>( >+ window->handle())) { >+ if (const auto seat = waylandWindow->display()->lastInputDevice()) { >+ if (const auto shellSurface = waylandWindow->shellSurface()) { >+#if QT_VERSION >= QT_VERSION_CHECK(5, 13, 0) >+ shellSurface->resize(seat, edges); >+ return true; >+#else // Qt >= 5.13 >+ shellSurface->resize(seat, WlResizeFromEdges(edges)); >+ return true; >+#endif // Qt < 5.13 >+ } >+ } >+ } >+#endif // Qt < 5.15 && !DESKTOP_APP_QT_PATCHED >+ >+ return false; >+} >+ >+bool WaylandIntegration::showWindowMenu(QWindow *window) { >+#if QT_VERSION >= QT_VERSION_CHECK(5, 13, 0) || defined DESKTOP_APP_QT_PATCHED >+ if (const auto waylandWindow = static_cast<QWaylandWindow*>( >+ window->handle())) { >+ if (const auto seat = waylandWindow->display()->lastInputDevice()) { >+ if (const auto shellSurface = waylandWindow->shellSurface()) { >+ return shellSurface->showWindowMenu(seat); >+ } >+ } >+ } >+#endif // Qt >= 5.13 || DESKTOP_APP_QT_PATCHED >+ >+ return false; >+} >+ >+} // namespace internal >+} // namespace Platform >diff --git a/Telegram/SourceFiles/platform/linux/linux_wayland_integration.h b/Telegram/SourceFiles/platform/linux/linux_wayland_integration.h >new file mode 100644 >index 0000000000..73486fef7b >--- /dev/null >+++ b/Telegram/SourceFiles/platform/linux/linux_wayland_integration.h >@@ -0,0 +1,27 @@ >+/* >+This file is part of Telegram Desktop, >+the official desktop application for the Telegram messaging service. >+ >+For license and copyright information please follow this link: >+https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL >+*/ >+#pragma once >+ >+class QWindow; >+ >+namespace Platform { >+namespace internal { >+ >+class WaylandIntegration { >+public: >+ static WaylandIntegration *Instance(); >+ bool startMove(QWindow *window); >+ bool startResize(QWindow *window, Qt::Edges edges); >+ bool showWindowMenu(QWindow *window); >+ >+private: >+ WaylandIntegration(); >+}; >+ >+} // namespace internal >+} // namespace Platform >diff --git a/Telegram/SourceFiles/platform/linux/linux_wayland_integration_dummy.cpp b/Telegram/SourceFiles/platform/linux/linux_wayland_integration_dummy.cpp >new file mode 100644 >index 0000000000..e79fd2d95e >--- /dev/null >+++ b/Telegram/SourceFiles/platform/linux/linux_wayland_integration_dummy.cpp >@@ -0,0 +1,37 @@ >+/* >+This file is part of Telegram Desktop, >+the official desktop application for the Telegram messaging service. >+ >+For license and copyright information please follow this link: >+https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL >+*/ >+#include "platform/linux/linux_wayland_integration.h" >+ >+#include "base/platform/base_platform_info.h" >+ >+namespace Platform { >+namespace internal { >+ >+WaylandIntegration::WaylandIntegration() { >+} >+ >+WaylandIntegration *WaylandIntegration::Instance() { >+ if (!IsWayland()) return nullptr; >+ static WaylandIntegration instance; >+ return &instance; >+} >+ >+bool WaylandIntegration::startMove(QWindow *window) { >+ return false; >+} >+ >+bool WaylandIntegration::startResize(QWindow *window, Qt::Edges edges) { >+ return false; >+} >+ >+bool WaylandIntegration::showWindowMenu(QWindow *window) { >+ return false; >+} >+ >+} // namespace internal >+} // namespace Platform >diff --git a/Telegram/SourceFiles/platform/linux/specific_linux.cpp b/Telegram/SourceFiles/platform/linux/specific_linux.cpp >index 1e7b5dd449..e2125a62c4 100644 >--- a/Telegram/SourceFiles/platform/linux/specific_linux.cpp >+++ b/Telegram/SourceFiles/platform/linux/specific_linux.cpp >@@ -16,6 +16,7 @@ For license and copyright information please follow this link: > #include "mainwindow.h" > #include "platform/linux/linux_desktop_environment.h" > #include "platform/linux/file_utilities_linux.h" >+#include "platform/linux/linux_wayland_integration.h" > #include "platform/platform_notifications_manager.h" > #include "storage/localstorage.h" > #include "core/crash_reports.h" >@@ -31,10 +32,6 @@ For license and copyright information please follow this link: > #include <QtCore/QLibraryInfo> > #include <QtGui/QWindow> > >-#include <private/qwaylanddisplay_p.h> >-#include <private/qwaylandwindow_p.h> >-#include <private/qwaylandshellsurface_p.h> >- > #ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION > #include <QtDBus/QDBusInterface> > #include <QtDBus/QDBusConnection> >@@ -46,10 +43,6 @@ For license and copyright information please follow this link: > #include <xcb/xcb.h> > #include <xcb/screensaver.h> > >-#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0) && !defined DESKTOP_APP_QT_PATCHED >-#include <wayland-client.h> >-#endif // Qt < 5.13 && !DESKTOP_APP_QT_PATCHED >- > #include <glib.h> > > extern "C" { >@@ -69,7 +62,7 @@ extern "C" { > > using namespace Platform; > using Platform::File::internal::EscapeShell; >-using QtWaylandClient::QWaylandWindow; >+using Platform::internal::WaylandIntegration; > > namespace Platform { > namespace { >@@ -334,29 +327,6 @@ uint XCBMoveResizeFromEdges(Qt::Edges edges) { > return 0; > } > >-#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0) && !defined DESKTOP_APP_QT_PATCHED >-enum wl_shell_surface_resize WlResizeFromEdges(Qt::Edges edges) { >- if (edges == (Qt::TopEdge | Qt::LeftEdge)) >- return WL_SHELL_SURFACE_RESIZE_TOP_LEFT; >- if (edges == Qt::TopEdge) >- return WL_SHELL_SURFACE_RESIZE_TOP; >- if (edges == (Qt::TopEdge | Qt::RightEdge)) >- return WL_SHELL_SURFACE_RESIZE_TOP_RIGHT; >- if (edges == Qt::RightEdge) >- return WL_SHELL_SURFACE_RESIZE_RIGHT; >- if (edges == (Qt::RightEdge | Qt::BottomEdge)) >- return WL_SHELL_SURFACE_RESIZE_BOTTOM_RIGHT; >- if (edges == Qt::BottomEdge) >- return WL_SHELL_SURFACE_RESIZE_BOTTOM; >- if (edges == (Qt::BottomEdge | Qt::LeftEdge)) >- return WL_SHELL_SURFACE_RESIZE_BOTTOM_LEFT; >- if (edges == Qt::LeftEdge) >- return WL_SHELL_SURFACE_RESIZE_LEFT; >- >- return WL_SHELL_SURFACE_RESIZE_NONE; >-} >-#endif // Qt < 5.13 && !DESKTOP_APP_QT_PATCHED >- > bool StartXCBMoveResize(QWindow *window, int edges) { > const auto connection = base::Platform::XCB::GetConnectionFromQt(); > if (!connection) { >@@ -449,59 +419,6 @@ bool ShowXCBWindowMenu(QWindow *window) { > return true; > } > >-bool StartWaylandMove(QWindow *window) { >- // There are startSystemMove on Qt 5.15 >-#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) && !defined DESKTOP_APP_QT_PATCHED >- if (const auto waylandWindow = static_cast<QWaylandWindow*>( >- window->handle())) { >- if (const auto seat = waylandWindow->display()->lastInputDevice()) { >- if (const auto shellSurface = waylandWindow->shellSurface()) { >- return shellSurface->move(seat); >- } >- } >- } >-#endif // Qt < 5.15 && !DESKTOP_APP_QT_PATCHED >- >- return false; >-} >- >-bool StartWaylandResize(QWindow *window, Qt::Edges edges) { >- // There are startSystemResize on Qt 5.15 >-#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) && !defined DESKTOP_APP_QT_PATCHED >- if (const auto waylandWindow = static_cast<QWaylandWindow*>( >- window->handle())) { >- if (const auto seat = waylandWindow->display()->lastInputDevice()) { >- if (const auto shellSurface = waylandWindow->shellSurface()) { >-#if QT_VERSION >= QT_VERSION_CHECK(5, 13, 0) >- shellSurface->resize(seat, edges); >- return true; >-#else // Qt >= 5.13 >- shellSurface->resize(seat, WlResizeFromEdges(edges)); >- return true; >-#endif // Qt < 5.13 >- } >- } >- } >-#endif // Qt < 5.15 && !DESKTOP_APP_QT_PATCHED >- >- return false; >-} >- >-bool ShowWaylandWindowMenu(QWindow *window) { >-#if QT_VERSION >= QT_VERSION_CHECK(5, 13, 0) || defined DESKTOP_APP_QT_PATCHED >- if (const auto waylandWindow = static_cast<QWaylandWindow*>( >- window->handle())) { >- if (const auto seat = waylandWindow->display()->lastInputDevice()) { >- if (const auto shellSurface = waylandWindow->shellSurface()) { >- return shellSurface->showWindowMenu(seat); >- } >- } >- } >-#endif // Qt >= 5.13 || DESKTOP_APP_QT_PATCHED >- >- return false; >-} >- > bool XCBFrameExtentsSupported() { > const auto connection = base::Platform::XCB::GetConnectionFromQt(); > if (!connection) { >@@ -859,24 +776,24 @@ bool SkipTaskbarSupported() { > } > > bool StartSystemMove(QWindow *window) { >- if (IsWayland()) { >- return StartWaylandMove(window); >+ if (const auto integration = WaylandIntegration::Instance()) { >+ return integration->startMove(window); > } else { > return StartXCBMoveResize(window, 16); > } > } > > bool StartSystemResize(QWindow *window, Qt::Edges edges) { >- if (IsWayland()) { >- return StartWaylandResize(window, edges); >+ if (const auto integration = WaylandIntegration::Instance()) { >+ return integration->startResize(window, edges); > } else { > return StartXCBMoveResize(window, edges); > } > } > > bool ShowWindowMenu(QWindow *window) { >- if (IsWayland()) { >- return ShowWaylandWindowMenu(window); >+ if (const auto integration = WaylandIntegration::Instance()) { >+ return integration->showWindowMenu(window); > } else { > return ShowXCBWindowMenu(window); > } >diff --git a/Telegram/SourceFiles/platform/linux/window_title_linux.cpp b/Telegram/SourceFiles/platform/linux/window_title_linux.cpp >new file mode 100644 >index 0000000000..95e8b6449d >--- /dev/null >+++ b/Telegram/SourceFiles/platform/linux/window_title_linux.cpp >@@ -0,0 +1,38 @@ >+/* >+This file is part of Telegram Desktop, >+the official desktop application for the Telegram messaging service. >+ >+For license and copyright information please follow this link: >+https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL >+*/ >+#include "platform/linux/window_title_linux.h" >+ >+#include "platform/linux/linux_desktop_environment.h" >+#include "base/platform/base_platform_info.h" >+ >+namespace Platform { >+namespace { >+ >+bool SystemMoveResizeSupported() { >+#if !defined DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION || QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) || defined DESKTOP_APP_QT_PATCHED >+ return true; >+#else // !DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION || Qt >= 5.15 || DESKTOP_APP_QT_PATCHED >+ return !IsWayland(); >+#endif // !DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION || Qt >= 5.15 || DESKTOP_APP_QT_PATCHED >+} >+ >+} // namespace >+ >+bool AllowNativeWindowFrameToggle() { >+ return SystemMoveResizeSupported() >+ // https://gitlab.gnome.org/GNOME/mutter/-/issues/217 >+ && !(DesktopEnvironment::IsGnome() && IsWayland()); >+} >+ >+object_ptr<Window::TitleWidget> CreateTitleWidget(QWidget *parent) { >+ return SystemMoveResizeSupported() >+ ? object_ptr<Window::TitleWidgetQt>(parent) >+ : object_ptr<Window::TitleWidgetQt>{ nullptr }; >+} >+ >+} // namespace Platform >diff --git a/Telegram/SourceFiles/platform/linux/window_title_linux.h b/Telegram/SourceFiles/platform/linux/window_title_linux.h >index 4e5f68e02d..c493976c2f 100644 >--- a/Telegram/SourceFiles/platform/linux/window_title_linux.h >+++ b/Telegram/SourceFiles/platform/linux/window_title_linux.h >@@ -8,8 +8,6 @@ For license and copyright information please follow this link: > #pragma once > > #include "platform/platform_window_title.h" >-#include "platform/linux/linux_desktop_environment.h" >-#include "base/platform/base_platform_info.h" > #include "base/object_ptr.h" > > namespace Window { >@@ -23,14 +21,8 @@ void DefaultPreviewWindowFramePaint(QImage &preview, const style::palette &palet > > namespace Platform { > >-inline bool AllowNativeWindowFrameToggle() { >- // https://gitlab.gnome.org/GNOME/mutter/-/issues/217 >- return !(DesktopEnvironment::IsGnome() && IsWayland()); >-} >- >-inline object_ptr<Window::TitleWidget> CreateTitleWidget(QWidget *parent) { >- return object_ptr<Window::TitleWidgetQt>(parent); >-} >+bool AllowNativeWindowFrameToggle(); >+object_ptr<Window::TitleWidget> CreateTitleWidget(QWidget *parent); > > inline bool NativeTitleRequiresShadow() { > return false; >diff --git a/Telegram/SourceFiles/qt_static_plugins.cpp b/Telegram/SourceFiles/qt_static_plugins.cpp >index 5dffd6a7a6..21c0980f28 100644 >--- a/Telegram/SourceFiles/qt_static_plugins.cpp >+++ b/Telegram/SourceFiles/qt_static_plugins.cpp >@@ -21,6 +21,18 @@ Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin) > Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin) > Q_IMPORT_PLUGIN(QGenericEnginePlugin) > #elif defined Q_OS_UNIX // Q_OS_WIN | Q_OS_MAC >+Q_IMPORT_PLUGIN(QXcbIntegrationPlugin) >+Q_IMPORT_PLUGIN(QGenericEnginePlugin) >+Q_IMPORT_PLUGIN(QComposePlatformInputContextPlugin) >+Q_IMPORT_PLUGIN(QSvgPlugin) >+Q_IMPORT_PLUGIN(QSvgIconPlugin) >+#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION >+Q_IMPORT_PLUGIN(QConnmanEnginePlugin) >+Q_IMPORT_PLUGIN(QNetworkManagerEnginePlugin) >+Q_IMPORT_PLUGIN(QIbusPlatformInputContextPlugin) >+Q_IMPORT_PLUGIN(QXdgDesktopPortalThemePlugin) >+#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION >+#ifndef DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION > Q_IMPORT_PLUGIN(ShmServerBufferPlugin) > Q_IMPORT_PLUGIN(DmaBufServerBufferPlugin) > Q_IMPORT_PLUGIN(DrmEglServerBufferPlugin) >@@ -31,31 +43,23 @@ Q_IMPORT_PLUGIN(QWaylandXdgShellV5IntegrationPlugin) > Q_IMPORT_PLUGIN(QWaylandXdgShellV6IntegrationPlugin) > Q_IMPORT_PLUGIN(QWaylandXdgShellIntegrationPlugin) > Q_IMPORT_PLUGIN(QWaylandBradientDecorationPlugin) >-Q_IMPORT_PLUGIN(QXcbIntegrationPlugin) > Q_IMPORT_PLUGIN(QWaylandIntegrationPlugin) > Q_IMPORT_PLUGIN(QWaylandEglPlatformIntegrationPlugin) >-Q_IMPORT_PLUGIN(QGenericEnginePlugin) >-Q_IMPORT_PLUGIN(QComposePlatformInputContextPlugin) >-Q_IMPORT_PLUGIN(QSvgPlugin) >-Q_IMPORT_PLUGIN(QSvgIconPlugin) >-#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION >-Q_IMPORT_PLUGIN(QConnmanEnginePlugin) >-Q_IMPORT_PLUGIN(QNetworkManagerEnginePlugin) >-Q_IMPORT_PLUGIN(QIbusPlatformInputContextPlugin) >-Q_IMPORT_PLUGIN(QXdgDesktopPortalThemePlugin) >-#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION >+#endif // !DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION > #endif // Q_OS_WIN | Q_OS_MAC | Q_OS_UNIX > #endif // !DESKTOP_APP_USE_PACKAGED > > #if defined Q_OS_UNIX && !defined Q_OS_MAC > #if !defined DESKTOP_APP_USE_PACKAGED || defined DESKTOP_APP_USE_PACKAGED_LAZY >-Q_IMPORT_PLUGIN(QWaylandMaterialDecorationPlugin) > Q_IMPORT_PLUGIN(NimfInputContextPlugin) > #ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION > Q_IMPORT_PLUGIN(QFcitxPlatformInputContextPlugin) > Q_IMPORT_PLUGIN(QFcitx5PlatformInputContextPlugin) > Q_IMPORT_PLUGIN(QHimePlatformInputContextPlugin) > #endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION >+#ifndef DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION >+Q_IMPORT_PLUGIN(QWaylandMaterialDecorationPlugin) >+#endif // !DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION > #endif // !DESKTOP_APP_USE_PACKAGED || DESKTOP_APP_USE_PACKAGED_LAZY > > #if !defined DESKTOP_APP_USE_PACKAGED || defined DESKTOP_APP_USE_PACKAGED_LAZY_PLATFORMTHEMES
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 753737
:
670589
|
670592
| 671893