mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 07:33:52 +02:00
libwayland headers are needed only with Qt < 5.13
This commit is contained in:
parent
ab95751a66
commit
2b89700f66
2 changed files with 6 additions and 1 deletions
|
@ -127,7 +127,7 @@ PRIVATE
|
||||||
desktop-app::external_openal
|
desktop-app::external_openal
|
||||||
)
|
)
|
||||||
|
|
||||||
if (LINUX AND DESKTOP_APP_USE_PACKAGED)
|
if (LINUX AND DESKTOP_APP_USE_PACKAGED AND Qt5WaylandClient_VERSION VERSION_LESS 5.13.0)
|
||||||
find_package(PkgConfig REQUIRED)
|
find_package(PkgConfig REQUIRED)
|
||||||
pkg_check_modules(WAYLAND_CLIENT REQUIRED wayland-client)
|
pkg_check_modules(WAYLAND_CLIENT REQUIRED wayland-client)
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
|
|
||||||
#include <xcb/xcb.h>
|
#include <xcb/xcb.h>
|
||||||
#include <xcb/screensaver.h>
|
#include <xcb/screensaver.h>
|
||||||
|
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0) && !defined DESKTOP_APP_QT_PATCHED
|
||||||
#include <wayland-client.h>
|
#include <wayland-client.h>
|
||||||
|
#endif // Qt < 5.13 && !DESKTOP_APP_QT_PATCHED
|
||||||
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
@ -463,6 +466,7 @@ uint XCBMoveResizeFromEdges(Qt::Edges edges) {
|
||||||
return 0;
|
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) {
|
enum wl_shell_surface_resize WlResizeFromEdges(Qt::Edges edges) {
|
||||||
if (edges == (Qt::TopEdge | Qt::LeftEdge))
|
if (edges == (Qt::TopEdge | Qt::LeftEdge))
|
||||||
return WL_SHELL_SURFACE_RESIZE_TOP_LEFT;
|
return WL_SHELL_SURFACE_RESIZE_TOP_LEFT;
|
||||||
|
@ -483,6 +487,7 @@ enum wl_shell_surface_resize WlResizeFromEdges(Qt::Edges edges) {
|
||||||
|
|
||||||
return WL_SHELL_SURFACE_RESIZE_NONE;
|
return WL_SHELL_SURFACE_RESIZE_NONE;
|
||||||
}
|
}
|
||||||
|
#endif // Qt < 5.13 && !DESKTOP_APP_QT_PATCHED
|
||||||
|
|
||||||
bool StartXCBMoveResize(QWindow *window, int edges) {
|
bool StartXCBMoveResize(QWindow *window, int edges) {
|
||||||
const auto native = QGuiApplication::platformNativeInterface();
|
const auto native = QGuiApplication::platformNativeInterface();
|
||||||
|
|
Loading…
Add table
Reference in a new issue