git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #107476 from CertainLach/kwin-wayland-wrapper

kwin: allow using wrapper for qpa

commitbd2cf10c0cf2d15e8b3fc9932f28de40b3d580e4 authorThomas Tuegel <ttuegel@mailbox.org> dateWed 24 Mar 2021, 16:15 (6 years ago) parent6aa079ed7f5ac9
4 files changed+37−10
pkgs/desktops/plasma-5/kwin/0001-follow-symlinks.patch+5−5 pkgs/desktops/plasma-5/kwin/0002-xwayland.patch+5−5 pkgs/desktops/plasma-5/kwin/0003-plugins-qpa-allow-using-nixos-wrapper.patch+26 pkgs/desktops/plasma-5/kwin/default.nix+1
pkgs/desktops/plasma-5/kwin/0001-follow-symlinks.patch+5−5
@@ -1,17 +1,17 @@
1−From 449896c45b23f50c168d8d2789832024c906ec36 Mon Sep 17 00:00:00 2001
1+From af569c9ed8079169b524b31461e2789baa09ef7a Mon Sep 17 00:00:00 2001
22From: Thomas Tuegel <ttuegel@mailbox.org>
33Date: Mon, 27 Jan 2020 05:31:13 -0600
4−Subject: [PATCH 1/2] follow symlinks
4+Subject: [PATCH 1/3] follow symlinks
55
66---
77 plugins/kdecorations/aurorae/src/aurorae.cpp | 2 +-
88 1 file changed, 1 insertion(+), 1 deletion(-)
99
1010diff --git a/plugins/kdecorations/aurorae/src/aurorae.cpp b/plugins/kdecorations/aurorae/src/aurorae.cpp
11−index fd723a8..fb95633 100644
11+index 5242cb7..2e4ddae 100644
1212--- a/plugins/kdecorations/aurorae/src/aurorae.cpp
1313+++ b/plugins/kdecorations/aurorae/src/aurorae.cpp
14−@@ -211,7 +211,7 @@ void Helper::init()
14+@@ -201,7 +201,7 @@ void Helper::init()
1515 // so let's try to locate our plugin:
1616 QString pluginPath;
1717 for (const QString &path : m_engine->importPathList()) {
@@ -21,5 +21,5 @@ index fd723a8..fb95633 100644
2121 it.next();
2222 QFileInfo fileInfo = it.fileInfo();
2323--
24−2.23.1
24+2.29.2
2525
pkgs/desktops/plasma-5/kwin/0002-xwayland.patch+5−5
@@ -1,17 +1,17 @@
1−From d584b075d71c4486710c0bbed6d44038f2ff5075 Mon Sep 17 00:00:00 2001
1+From 5c90dd84f541bd4789525f12f12ad24411b99018 Mon Sep 17 00:00:00 2001
22From: Thomas Tuegel <ttuegel@mailbox.org>
33Date: Mon, 27 Jan 2020 05:31:23 -0600
4−Subject: [PATCH 2/2] xwayland
4+Subject: [PATCH 2/3] xwayland
55
66---
77 xwl/xwayland.cpp | 2 +-
88 1 file changed, 1 insertion(+), 1 deletion(-)
99
1010diff --git a/xwl/xwayland.cpp b/xwl/xwayland.cpp
11−index 5f17d39..b4b69ba 100644
11+index 57efdde..a211a58 100644
1212--- a/xwl/xwayland.cpp
1313+++ b/xwl/xwayland.cpp
14−@@ -145,7 +145,7 @@ void Xwayland::init()
14+@@ -124,7 +124,7 @@ void Xwayland::start()
1515
1616 m_xwaylandProcess = new Process(this);
1717 m_xwaylandProcess->setProcessChannelMode(QProcess::ForwardedErrorChannel);
@@ -21,5 +21,5 @@ index 5f17d39..b4b69ba 100644
2121 env.insert("WAYLAND_SOCKET", QByteArray::number(wlfd));
2222 env.insert("EGL_PLATFORM", QByteArrayLiteral("DRM"));
2323--
24−2.23.1
24+2.29.2
2525
pkgs/desktops/plasma-5/kwin/0003-plugins-qpa-allow-using-nixos-wrapper.patchnew file+26
@@ -0,0 +1,26 @@
1+From 8d49f5ef8692c352a62f4f8b1bc68e6e210bbee6 Mon Sep 17 00:00:00 2001
2+From: Yaroslav Bolyukin <iam@lach.pw>
3+Date: Wed, 23 Dec 2020 18:02:14 +0300
4+Subject: [PATCH 3/3] plugins/qpa: allow using nixos wrapper
5+
6+Signed-off-by: Yaroslav Bolyukin <iam@lach.pw>
7+---
8+ plugins/qpa/main.cpp | 2 +-
9+ 1 file changed, 1 insertion(+), 1 deletion(-)
10+
11+diff --git a/plugins/qpa/main.cpp b/plugins/qpa/main.cpp
12+index efd236b..a69c046 100644
13+--- a/plugins/qpa/main.cpp
14++++ b/plugins/qpa/main.cpp
15+@@ -23,7 +23,7 @@ public:
16+ QPlatformIntegration *KWinIntegrationPlugin::create(const QString &system, const QStringList &paramList)
17+ {
18+ Q_UNUSED(paramList)
19+- if (!QCoreApplication::applicationFilePath().endsWith(QLatin1String("kwin_wayland")) && !qEnvironmentVariableIsSet("KWIN_FORCE_OWN_QPA")) {
20++ if (!QCoreApplication::applicationFilePath().endsWith(QLatin1String("kwin_wayland")) && !QCoreApplication::applicationFilePath().endsWith(QLatin1String(".kwin_wayland-wrapped")) && !qEnvironmentVariableIsSet("KWIN_FORCE_OWN_QPA")) {
21+ // Not KWin
22+ return nullptr;
23+ }
24+--
25+2.29.2
26+
pkgs/desktops/plasma-5/kwin/default.nix+1
@@ -37,6 +37,7 @@ mkDerivation {
3737 patches = [
3838 ./0001-follow-symlinks.patch
3939 ./0002-xwayland.patch
40+ ./0003-plugins-qpa-allow-using-nixos-wrapper.patch
4041 ];
4142 CXXFLAGS = [
4243 ''-DNIXPKGS_XWAYLAND=\"${lib.getBin xwayland}/bin/Xwayland\"''