Merge pull request #107476 from CertainLach/kwin-wayland-wrapper

kwin: allow using wrapper for qpa
This commit is contained in:
Thomas Tuegel 2021-03-24 16:15:17 -05:00 committed by GitHub
commit bd2cf10c0c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 37 additions and 10 deletions

View file

@ -1,17 +1,17 @@
From 449896c45b23f50c168d8d2789832024c906ec36 Mon Sep 17 00:00:00 2001
From af569c9ed8079169b524b31461e2789baa09ef7a Mon Sep 17 00:00:00 2001
From: Thomas Tuegel <ttuegel@mailbox.org>
Date: Mon, 27 Jan 2020 05:31:13 -0600
Subject: [PATCH 1/2] follow symlinks
Subject: [PATCH 1/3] follow symlinks
---
plugins/kdecorations/aurorae/src/aurorae.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/kdecorations/aurorae/src/aurorae.cpp b/plugins/kdecorations/aurorae/src/aurorae.cpp
index fd723a8..fb95633 100644
index 5242cb7..2e4ddae 100644
--- a/plugins/kdecorations/aurorae/src/aurorae.cpp
+++ b/plugins/kdecorations/aurorae/src/aurorae.cpp
@@ -211,7 +211,7 @@ void Helper::init()
@@ -201,7 +201,7 @@ void Helper::init()
// so let's try to locate our plugin:
QString pluginPath;
for (const QString &path : m_engine->importPathList()) {
@ -21,5 +21,5 @@ index fd723a8..fb95633 100644
it.next();
QFileInfo fileInfo = it.fileInfo();
--
2.23.1
2.29.2

View file

@ -1,17 +1,17 @@
From d584b075d71c4486710c0bbed6d44038f2ff5075 Mon Sep 17 00:00:00 2001
From 5c90dd84f541bd4789525f12f12ad24411b99018 Mon Sep 17 00:00:00 2001
From: Thomas Tuegel <ttuegel@mailbox.org>
Date: Mon, 27 Jan 2020 05:31:23 -0600
Subject: [PATCH 2/2] xwayland
Subject: [PATCH 2/3] xwayland
---
xwl/xwayland.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xwl/xwayland.cpp b/xwl/xwayland.cpp
index 5f17d39..b4b69ba 100644
index 57efdde..a211a58 100644
--- a/xwl/xwayland.cpp
+++ b/xwl/xwayland.cpp
@@ -145,7 +145,7 @@ void Xwayland::init()
@@ -124,7 +124,7 @@ void Xwayland::start()
m_xwaylandProcess = new Process(this);
m_xwaylandProcess->setProcessChannelMode(QProcess::ForwardedErrorChannel);
@ -21,5 +21,5 @@ index 5f17d39..b4b69ba 100644
env.insert("WAYLAND_SOCKET", QByteArray::number(wlfd));
env.insert("EGL_PLATFORM", QByteArrayLiteral("DRM"));
--
2.23.1
2.29.2

View file

@ -0,0 +1,26 @@
From 8d49f5ef8692c352a62f4f8b1bc68e6e210bbee6 Mon Sep 17 00:00:00 2001
From: Yaroslav Bolyukin <iam@lach.pw>
Date: Wed, 23 Dec 2020 18:02:14 +0300
Subject: [PATCH 3/3] plugins/qpa: allow using nixos wrapper
Signed-off-by: Yaroslav Bolyukin <iam@lach.pw>
---
plugins/qpa/main.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/qpa/main.cpp b/plugins/qpa/main.cpp
index efd236b..a69c046 100644
--- a/plugins/qpa/main.cpp
+++ b/plugins/qpa/main.cpp
@@ -23,7 +23,7 @@ public:
QPlatformIntegration *KWinIntegrationPlugin::create(const QString &system, const QStringList &paramList)
{
Q_UNUSED(paramList)
- if (!QCoreApplication::applicationFilePath().endsWith(QLatin1String("kwin_wayland")) && !qEnvironmentVariableIsSet("KWIN_FORCE_OWN_QPA")) {
+ if (!QCoreApplication::applicationFilePath().endsWith(QLatin1String("kwin_wayland")) && !QCoreApplication::applicationFilePath().endsWith(QLatin1String(".kwin_wayland-wrapped")) && !qEnvironmentVariableIsSet("KWIN_FORCE_OWN_QPA")) {
// Not KWin
return nullptr;
}
--
2.29.2

View file

@ -37,6 +37,7 @@ mkDerivation {
patches = [
./0001-follow-symlinks.patch
./0002-xwayland.patch
./0003-plugins-qpa-allow-using-nixos-wrapper.patch
];
CXXFLAGS = [
''-DNIXPKGS_XWAYLAND=\"${lib.getBin xwayland}/bin/Xwayland\"''