Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 670589 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), 5.27 KB, created by
Esteve Varela Colominas
on 2020-11-09 16:47:07 UTC
(
hide
)
Description:
Patch to include in FILESDIR
Filename:
MIME Type:
Creator:
Esteve Varela Colominas
Created:
2020-11-09 16:47:07 UTC
Size:
5.27 KB
patch
obsolete
>--- a/Telegram/CMakeLists.txt >+++ b/Telegram/CMakeLists.txt >@@ -89,7 +89,7 @@ if (LINUX) > ) > endif() > >- if (DESKTOP_APP_USE_PACKAGED AND Qt5WaylandClient_VERSION VERSION_LESS 5.13.0) >+ if (NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION AND DESKTOP_APP_USE_PACKAGED AND Qt5WaylandClient_VERSION VERSION_LESS 5.13.0) > find_package(PkgConfig REQUIRED) > pkg_check_modules(WAYLAND_CLIENT REQUIRED wayland-client) > >--- a/Telegram/SourceFiles/platform/linux/specific_linux.cpp >+++ b/Telegram/SourceFiles/platform/linux/specific_linux.cpp >@@ -31,10 +31,16 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL > #include <QtCore/QLibraryInfo> > #include <QtGui/QWindow> > >+#ifndef DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION > #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 >+#endif // !DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION >+ > #ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION > #include <QtDBus/QDBusInterface> > #include <QtDBus/QDBusConnection> >@@ -46,10 +52,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL > #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 +71,9 @@ extern "C" { > > using namespace Platform; > using Platform::File::internal::EscapeShell; >+#ifndef DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION > using QtWaylandClient::QWaylandWindow; >+#endif > > namespace Platform { > namespace { >@@ -450,6 +454,7 @@ bool ShowXCBWindowMenu(QWindow *window) { > } > > bool StartWaylandMove(QWindow *window) { >+#ifndef DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION > // 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*>( >@@ -461,11 +466,13 @@ bool StartWaylandMove(QWindow *window) { > } > } > #endif // Qt < 5.15 && !DESKTOP_APP_QT_PATCHED >+#endif // !DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION > > return false; > } > > bool StartWaylandResize(QWindow *window, Qt::Edges edges) { >+#ifndef DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION > // 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*>( >@@ -483,11 +490,13 @@ bool StartWaylandResize(QWindow *window, Qt::Edges edges) { > } > } > #endif // Qt < 5.15 && !DESKTOP_APP_QT_PATCHED >+#endif // !DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION > > return false; > } > > bool ShowWaylandWindowMenu(QWindow *window) { >+#ifndef DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION > #if QT_VERSION >= QT_VERSION_CHECK(5, 13, 0) || defined DESKTOP_APP_QT_PATCHED > if (const auto waylandWindow = static_cast<QWaylandWindow*>( > window->handle())) { >@@ -498,6 +507,7 @@ bool ShowWaylandWindowMenu(QWindow *window) { > } > } > #endif // Qt >= 5.13 || DESKTOP_APP_QT_PATCHED >+#endif // DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION > > return false; > } >--- a/cmake/external/qt/package.cmake >+++ b/cmake/external/qt/package.cmake >@@ -24,7 +24,11 @@ find_package(Qt5 COMPONENTS Core Gui Widgets Network REQUIRED) > find_package(Qt5Gui COMPONENTS QWebpPlugin REQUIRED) > > if (LINUX) >- find_package(Qt5 COMPONENTS WaylandClient REQUIRED) >+ if (DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION) >+ find_package(Qt5 OPTIONAL_COMPONENTS WaylandClient QUIET) >+ else() >+ find_package(Qt5 COMPONENTS WaylandClient REQUIRED) >+ endif() > find_package(Qt5 OPTIONAL_COMPONENTS XkbCommonSupport QUIET) > > if (NOT DESKTOP_APP_USE_PACKAGED OR DESKTOP_APP_USE_PACKAGED_LAZY_PLATFORMTHEMES) >--- 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 >--- 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}) >--- a/Telegram/lib_base/base/platform/linux/base_info_linux.cpp >+++ b/Telegram/lib_base/base/platform/linux/base_info_linux.cpp >@@ -143,7 +143,11 @@ QString GetLibcVersion() { > } > > bool IsWayland() { >+#ifndef DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION > return QGuiApplication::platformName().startsWith("wayland", Qt::CaseInsensitive); >+#else >+ return false; >+#endif > } > > void Start(QJsonObject options) {
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