From 0184f0e47cf765bb1990ed98f5d9044f1089c1a0 Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Thu, 4 Aug 2016 09:46:35 -0500 Subject: [PATCH] kwin: add xwayland input --- .../0001-qdiriterator-follow-symlinks.patch | 25 ------------- pkgs/desktops/kde-5/plasma/kwin/default.nix | 35 +++++++++++-------- .../kde-5/plasma/kwin/follow-symlinks.patch | 13 +++++++ pkgs/desktops/kde-5/plasma/kwin/series | 2 ++ .../desktops/kde-5/plasma/kwin/xwayland.patch | 13 +++++++ 5 files changed, 48 insertions(+), 40 deletions(-) delete mode 100644 pkgs/desktops/kde-5/plasma/kwin/0001-qdiriterator-follow-symlinks.patch create mode 100644 pkgs/desktops/kde-5/plasma/kwin/follow-symlinks.patch create mode 100644 pkgs/desktops/kde-5/plasma/kwin/series create mode 100644 pkgs/desktops/kde-5/plasma/kwin/xwayland.patch diff --git a/pkgs/desktops/kde-5/plasma/kwin/0001-qdiriterator-follow-symlinks.patch b/pkgs/desktops/kde-5/plasma/kwin/0001-qdiriterator-follow-symlinks.patch deleted file mode 100644 index 7a70fec0d2d..00000000000 --- a/pkgs/desktops/kde-5/plasma/kwin/0001-qdiriterator-follow-symlinks.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 78a4b554187c18fd86b62089f7730c4273fadd4c Mon Sep 17 00:00:00 2001 -From: Thomas Tuegel -Date: Wed, 14 Oct 2015 07:05:22 -0500 -Subject: [PATCH] qdiriterator follow symlinks - ---- - clients/aurorae/src/aurorae.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/clients/aurorae/src/aurorae.cpp b/clients/aurorae/src/aurorae.cpp -index 781c960..ad5f420 100644 ---- a/plugins/kdecorations/aurorae/src/aurorae.cpp -+++ b/plugins/kdecorations/aurorae/src/aurorae.cpp -@@ -211,7 +211,7 @@ void Helper::init() - // so let's try to locate our plugin: - QString pluginPath; - for (const QString &path : m_engine->importPathList()) { -- QDirIterator it(path, QDirIterator::Subdirectories); -+ QDirIterator it(path, QDirIterator::Subdirectories | QDirIterator::FollowSymlinks); - while (it.hasNext()) { - it.next(); - QFileInfo fileInfo = it.fileInfo(); --- -2.5.2 - diff --git a/pkgs/desktops/kde-5/plasma/kwin/default.nix b/pkgs/desktops/kde-5/plasma/kwin/default.nix index d121ba84dd0..7af947bcfe8 100644 --- a/pkgs/desktops/kde-5/plasma/kwin/default.nix +++ b/pkgs/desktops/kde-5/plasma/kwin/default.nix @@ -1,11 +1,12 @@ -{ plasmaPackage, ecm, kdoctools, epoxy -, kactivities, kcompletion, kcmutils, kconfig, kconfigwidgets -, kcoreaddons, kcrash, kdeclarative, kdecoration, kglobalaccel -, ki18n, kiconthemes, kidletime, kinit, kio, knewstuff, knotifications -, kpackage, kscreenlocker, kservice, kwayland, kwidgetsaddons, kwindowsystem -, kxmlgui, libinput, libICE, libSM, plasma-framework, qtdeclarative -, qtmultimedia, qtscript, qtx11extras, udev, wayland, xcb-util-cursor -, makeQtWrapper +{ + plasmaPackage, lib, copyPathsToStore, + ecm, kdoctools, + breeze-qt5, epoxy, kactivities, kcompletion, kcmutils, kconfig, + kconfigwidgets, kcoreaddons, kcrash, kdeclarative, kdecoration, kglobalaccel, + ki18n, kiconthemes, kidletime, kinit, kio, knewstuff, knotifications, + kpackage, kscreenlocker, kservice, kwayland, kwidgetsaddons, kwindowsystem, + kxmlgui, libinput, libICE, libSM, plasma-framework, qtdeclarative, + qtmultimedia, qtscript, qtx11extras, udev, wayland, xcb-util-cursor, xwayland }: plasmaPackage { @@ -15,13 +16,17 @@ plasmaPackage { kdoctools ]; propagatedBuildInputs = [ - kactivities kdeclarative kglobalaccel ki18n kio kscreenlocker kwindowsystem - plasma-framework qtdeclarative qtmultimedia qtx11extras epoxy kcompletion - kcmutils kconfig kconfigwidgets kcoreaddons kcrash kdecoration kiconthemes - kidletime kinit knewstuff knotifications kpackage kservice kwayland - kwidgetsaddons kxmlgui libinput libICE libSM qtscript udev wayland - xcb-util-cursor + breeze-qt5 epoxy kactivities kcmutils kcompletion kconfig kconfigwidgets + kcoreaddons kcrash kdeclarative kdecoration kglobalaccel ki18n kiconthemes + kidletime kinit kio knewstuff knotifications kpackage kscreenlocker kservice + kwayland kwidgetsaddons kwindowsystem kxmlgui libinput libICE libSM + plasma-framework qtdeclarative qtmultimedia qtscript qtx11extras udev + wayland xcb-util-cursor ]; - patches = [ ./0001-qdiriterator-follow-symlinks.patch ]; + patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); + postPatch = '' + substituteInPlace main_wayland.cpp \ + --subst-var-by xwayland ${lib.getBin xwayland}/bin/Xwayland + ''; cmakeFlags = [ "-DCMAKE_SKIP_BUILD_RPATH=OFF" ]; } diff --git a/pkgs/desktops/kde-5/plasma/kwin/follow-symlinks.patch b/pkgs/desktops/kde-5/plasma/kwin/follow-symlinks.patch new file mode 100644 index 00000000000..60b8f5ef541 --- /dev/null +++ b/pkgs/desktops/kde-5/plasma/kwin/follow-symlinks.patch @@ -0,0 +1,13 @@ +Index: kwin-5.7.3/plugins/kdecorations/aurorae/src/aurorae.cpp +=================================================================== +--- kwin-5.7.3.orig/plugins/kdecorations/aurorae/src/aurorae.cpp ++++ kwin-5.7.3/plugins/kdecorations/aurorae/src/aurorae.cpp +@@ -211,7 +211,7 @@ void Helper::init() + // so let's try to locate our plugin: + QString pluginPath; + for (const QString &path : m_engine->importPathList()) { +- QDirIterator it(path, QDirIterator::Subdirectories); ++ QDirIterator it(path, QDirIterator::Subdirectories | QDirIterator::FollowSymlinks); + while (it.hasNext()) { + it.next(); + QFileInfo fileInfo = it.fileInfo(); diff --git a/pkgs/desktops/kde-5/plasma/kwin/series b/pkgs/desktops/kde-5/plasma/kwin/series new file mode 100644 index 00000000000..9dbc88f4997 --- /dev/null +++ b/pkgs/desktops/kde-5/plasma/kwin/series @@ -0,0 +1,2 @@ +follow-symlinks.patch +xwayland.patch diff --git a/pkgs/desktops/kde-5/plasma/kwin/xwayland.patch b/pkgs/desktops/kde-5/plasma/kwin/xwayland.patch new file mode 100644 index 00000000000..5fde01d08bf --- /dev/null +++ b/pkgs/desktops/kde-5/plasma/kwin/xwayland.patch @@ -0,0 +1,13 @@ +Index: kwin-5.7.3/main_wayland.cpp +=================================================================== +--- kwin-5.7.3.orig/main_wayland.cpp ++++ kwin-5.7.3/main_wayland.cpp +@@ -315,7 +315,7 @@ void ApplicationWayland::startXwaylandSe + + m_xwaylandProcess = new Process(kwinApp()); + m_xwaylandProcess->setProcessChannelMode(QProcess::ForwardedErrorChannel); +- m_xwaylandProcess->setProgram(QStringLiteral("Xwayland")); ++ m_xwaylandProcess->setProgram(QStringLiteral("@xwayland@")); + QProcessEnvironment env = m_environment; + env.insert("WAYLAND_SOCKET", QByteArray::number(wlfd)); + m_xwaylandProcess->setProcessEnvironment(env);