Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 753737 | Differences between
and this patch

Collapse All | Expand All

(-)file_not_specified_in_diff (-12 / +38 lines)
Line  Link Here
0
-- a/Telegram/CMakeLists.txt
0
++ b/Telegram/CMakeLists.txt
Lines 89-95 if (LINUX) Link Here
89
        )
89
        )
90
    endif()
90
    endif()
91
91
92
    if (DESKTOP_APP_USE_PACKAGED AND Qt5WaylandClient_VERSION VERSION_LESS 5.13.0)
92
    if (NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION AND DESKTOP_APP_USE_PACKAGED AND Qt5WaylandClient_VERSION VERSION_LESS 5.13.0)
93
        find_package(PkgConfig REQUIRED)
93
        find_package(PkgConfig REQUIRED)
94
        pkg_check_modules(WAYLAND_CLIENT REQUIRED wayland-client)
94
        pkg_check_modules(WAYLAND_CLIENT REQUIRED wayland-client)
95
95
96
-- a/Telegram/SourceFiles/platform/linux/specific_linux.cpp
96
++ b/Telegram/SourceFiles/platform/linux/specific_linux.cpp
Lines 31-40 https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL Link Here
31
#include <QtCore/QLibraryInfo>
31
#include <QtCore/QLibraryInfo>
32
#include <QtGui/QWindow>
32
#include <QtGui/QWindow>
33
33
34
#ifndef DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION
34
#include <private/qwaylanddisplay_p.h>
35
#include <private/qwaylanddisplay_p.h>
35
#include <private/qwaylandwindow_p.h>
36
#include <private/qwaylandwindow_p.h>
36
#include <private/qwaylandshellsurface_p.h>
37
#include <private/qwaylandshellsurface_p.h>
37
38
39
#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0) && !defined DESKTOP_APP_QT_PATCHED
40
#include <wayland-client.h>
41
#endif // Qt < 5.13 && !DESKTOP_APP_QT_PATCHED
42
#endif // !DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION
43
38
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
44
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
39
#include <QtDBus/QDBusInterface>
45
#include <QtDBus/QDBusInterface>
40
#include <QtDBus/QDBusConnection>
46
#include <QtDBus/QDBusConnection>
Lines 46-55 https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL Link Here
46
#include <xcb/xcb.h>
52
#include <xcb/xcb.h>
47
#include <xcb/screensaver.h>
53
#include <xcb/screensaver.h>
48
54
49
#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0) && !defined DESKTOP_APP_QT_PATCHED
50
#include <wayland-client.h>
51
#endif // Qt < 5.13 && !DESKTOP_APP_QT_PATCHED
52
53
#include <glib.h>
55
#include <glib.h>
54
56
55
extern "C" {
57
extern "C" {
Lines 69-75 extern "C" { Link Here
69
71
70
using namespace Platform;
72
using namespace Platform;
71
using Platform::File::internal::EscapeShell;
73
using Platform::File::internal::EscapeShell;
74
#ifndef DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION
72
using QtWaylandClient::QWaylandWindow;
75
using QtWaylandClient::QWaylandWindow;
76
#endif
73
77
74
namespace Platform {
78
namespace Platform {
75
namespace {
79
namespace {
Lines 450-455 bool ShowXCBWindowMenu(QWindow *window) { Link Here
450
}
454
}
451
455
452
bool StartWaylandMove(QWindow *window) {
456
bool StartWaylandMove(QWindow *window) {
457
#ifndef DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION
453
	// There are startSystemMove on Qt 5.15
458
	// There are startSystemMove on Qt 5.15
454
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) && !defined DESKTOP_APP_QT_PATCHED
459
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) && !defined DESKTOP_APP_QT_PATCHED
455
	if (const auto waylandWindow = static_cast<QWaylandWindow*>(
460
	if (const auto waylandWindow = static_cast<QWaylandWindow*>(
Lines 461-471 bool StartWaylandMove(QWindow *window) { Link Here
461
		}
466
		}
462
	}
467
	}
463
#endif // Qt < 5.15 && !DESKTOP_APP_QT_PATCHED
468
#endif // Qt < 5.15 && !DESKTOP_APP_QT_PATCHED
469
#endif // !DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION
464
470
465
	return false;
471
	return false;
466
}
472
}
467
473
468
bool StartWaylandResize(QWindow *window, Qt::Edges edges) {
474
bool StartWaylandResize(QWindow *window, Qt::Edges edges) {
475
#ifndef DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION
469
	// There are startSystemResize on Qt 5.15
476
	// There are startSystemResize on Qt 5.15
470
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) && !defined DESKTOP_APP_QT_PATCHED
477
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) && !defined DESKTOP_APP_QT_PATCHED
471
	if (const auto waylandWindow = static_cast<QWaylandWindow*>(
478
	if (const auto waylandWindow = static_cast<QWaylandWindow*>(
Lines 483-493 bool StartWaylandResize(QWindow *window, Qt::Edges edges) { Link Here
483
		}
490
		}
484
	}
491
	}
485
#endif // Qt < 5.15 && !DESKTOP_APP_QT_PATCHED
492
#endif // Qt < 5.15 && !DESKTOP_APP_QT_PATCHED
493
#endif // !DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION
486
494
487
	return false;
495
	return false;
488
}
496
}
489
497
490
bool ShowWaylandWindowMenu(QWindow *window) {
498
bool ShowWaylandWindowMenu(QWindow *window) {
499
#ifndef DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION
491
#if QT_VERSION >= QT_VERSION_CHECK(5, 13, 0) || defined DESKTOP_APP_QT_PATCHED
500
#if QT_VERSION >= QT_VERSION_CHECK(5, 13, 0) || defined DESKTOP_APP_QT_PATCHED
492
	if (const auto waylandWindow = static_cast<QWaylandWindow*>(
501
	if (const auto waylandWindow = static_cast<QWaylandWindow*>(
493
		window->handle())) {
502
		window->handle())) {
Lines 498-503 bool ShowWaylandWindowMenu(QWindow *window) { Link Here
498
		}
507
		}
499
	}
508
	}
500
#endif // Qt >= 5.13 || DESKTOP_APP_QT_PATCHED
509
#endif // Qt >= 5.13 || DESKTOP_APP_QT_PATCHED
510
#endif // DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION
501
511
502
	return false;
512
	return false;
503
}
513
}
504
-- a/cmake/external/qt/package.cmake
514
++ b/cmake/external/qt/package.cmake
Lines 24-30 find_package(Qt5 COMPONENTS Core Gui Widgets Network REQUIRED) Link Here
24
find_package(Qt5Gui COMPONENTS QWebpPlugin REQUIRED)
24
find_package(Qt5Gui COMPONENTS QWebpPlugin REQUIRED)
25
25
26
if (LINUX)
26
if (LINUX)
27
    find_package(Qt5 COMPONENTS WaylandClient REQUIRED)
27
    if (DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
28
        find_package(Qt5 OPTIONAL_COMPONENTS WaylandClient QUIET)
29
    else()
30
        find_package(Qt5 COMPONENTS WaylandClient REQUIRED)
31
    endif()
28
    find_package(Qt5 OPTIONAL_COMPONENTS XkbCommonSupport QUIET)
32
    find_package(Qt5 OPTIONAL_COMPONENTS XkbCommonSupport QUIET)
29
33
30
    if (NOT DESKTOP_APP_USE_PACKAGED OR DESKTOP_APP_USE_PACKAGED_LAZY_PLATFORMTHEMES)
34
    if (NOT DESKTOP_APP_USE_PACKAGED OR DESKTOP_APP_USE_PACKAGED_LAZY_PLATFORMTHEMES)
31
-- a/cmake/options.cmake
35
++ b/cmake/options.cmake
Lines 26-31 if (DESKTOP_APP_DISABLE_DBUS_INTEGRATION) Link Here
26
    )
26
    )
27
endif()
27
endif()
28
28
29
if (DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
30
    target_compile_definitions(common_options
31
    INTERFACE
32
        DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION
33
    )
34
endif()
35
29
if (DESKTOP_APP_DISABLE_WEBRTC_INTEGRATION)
36
if (DESKTOP_APP_DISABLE_WEBRTC_INTEGRATION)
30
    target_compile_definitions(common_options
37
    target_compile_definitions(common_options
31
    INTERFACE
38
    INTERFACE
32
-- a/cmake/variables.cmake
39
++ b/cmake/variables.cmake
Lines 29-34 endif() Link Here
29
29
30
option(DESKTOP_APP_LOTTIE_USE_CACHE "Use caching in lottie animations." ON)
30
option(DESKTOP_APP_LOTTIE_USE_CACHE "Use caching in lottie animations." ON)
31
option(DESKTOP_APP_DISABLE_DBUS_INTEGRATION "Disable all code for D-Bus integration (Linux only)." OFF)
31
option(DESKTOP_APP_DISABLE_DBUS_INTEGRATION "Disable all code for D-Bus integration (Linux only)." OFF)
32
option(DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION "Disable all code for Wayland integration (Linux only)." OFF)
32
option(DESKTOP_APP_DISABLE_WEBRTC_INTEGRATION "Disable all code for WebRTC integration." OFF)
33
option(DESKTOP_APP_DISABLE_WEBRTC_INTEGRATION "Disable all code for WebRTC integration." OFF)
33
option(DESKTOP_APP_USE_GLIBC_WRAPS "Use wraps for new GLIBC features." OFF)
34
option(DESKTOP_APP_USE_GLIBC_WRAPS "Use wraps for new GLIBC features." OFF)
34
option(DESKTOP_APP_USE_PACKAGED "Find libraries using CMake instead of exact paths." ${no_special_target})
35
option(DESKTOP_APP_USE_PACKAGED "Find libraries using CMake instead of exact paths." ${no_special_target})
35
-- a/Telegram/lib_base/base/platform/linux/base_info_linux.cpp
36
++ b/Telegram/lib_base/base/platform/linux/base_info_linux.cpp
Lines 143-149 QString GetLibcVersion() { Link Here
143
}
143
}
144
144
145
bool IsWayland() {
145
bool IsWayland() {
146
#ifndef DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION
146
	return QGuiApplication::platformName().startsWith("wayland", Qt::CaseInsensitive);
147
	return QGuiApplication::platformName().startsWith("wayland", Qt::CaseInsensitive);
148
#else
149
	return false;
150
#endif
147
}
151
}
148
152
149
void Start(QJsonObject options) {
153
void Start(QJsonObject options) {

Return to bug 753737