-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net-im/nheko: remove forced wayland dependency
backported the fix from upstream Bug: https://bugs.gentoo.org/934414 Signed-off-by: tea <[email protected]>
- Loading branch information
Showing
2 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
net-im/nheko/files/nheko-0.12.0-remove-wayland-dep-on-x11.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# adapted from upstream commit: | ||
# <https://github.com/Nheko-Reborn/nheko/commit/941f7f5> | ||
|
||
From 3bc8117be9964af95210c865880bd2db8dc76a27 Mon Sep 17 00:00:00 2001 | ||
From: tea <[email protected]> | ||
Date: Fri, 5 Jul 2024 17:32:59 +0200 | ||
Subject: [PATCH] remove wayland dep on X11 | ||
|
||
--- | ||
src/main.cpp | 6 ++++-- | ||
1 file changed, 4 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/src/main.cpp b/src/main.cpp | ||
index 8ea15901..392867bb 100644 | ||
--- a/src/main.cpp | ||
+++ b/src/main.cpp | ||
@@ -21,7 +21,7 @@ | ||
|
||
// in theory we can enable this everywhere, but the header is missing on some of our CI systems and | ||
// it is too much effort to install. | ||
-#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) | ||
+#if __has_include(<QtGui/qpa/qplatformwindow_p.h>) | ||
#include <QtGui/qpa/qplatformwindow_p.h> | ||
#endif | ||
|
||
@@ -248,7 +248,9 @@ main(int argc, char *argv[]) | ||
if (!singleapp.isPrimaryInstance()) { | ||
auto token = qgetenv("XDG_ACTIVATION_TOKEN"); | ||
|
||
-#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) | ||
+#if __has_include(<QtGui/qpa/qplatformwindow_p.h>) && \ | ||
+ ((QT_VERSION >= QT_VERSION_CHECK(6, 7, 0) && QT_CONFIG(wayland)) || \ | ||
+ (QT_VERSION < QT_VERSION_CHECK(6, 7, 0) && defined(Q_OS_UNIX) && !defined(Q_OS_MACOS))) | ||
// getting a valid activation token on wayland is a bit of a pain, it works most reliably | ||
// when you have an actual window, that has the focus... | ||
auto waylandApp = app.nativeInterface<QNativeInterface::QWaylandApplication>(); | ||
-- | ||
2.44.2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters