summaryrefslogtreecommitdiffstats
path: root/kde/patch/kwin
diff options
context:
space:
mode:
Diffstat (limited to 'kde/patch/kwin')
-rw-r--r--kde/patch/kwin/kwin_cmake310.patch52
-rw-r--r--kde/patch/kwin/kwin_qt59_rootwindow_events.patch63
-rw-r--r--kde/patch/kwin/kwin_replace_logind_with_ck2.patch85
3 files changed, 200 insertions, 0 deletions
diff --git a/kde/patch/kwin/kwin_cmake310.patch b/kde/patch/kwin/kwin_cmake310.patch
new file mode 100644
index 0000000..5675ba5
--- /dev/null
+++ b/kde/patch/kwin/kwin_cmake310.patch
@@ -0,0 +1,52 @@
+Taken from:
+https://gitweb.gentoo.org/repo/gentoo.git/tree/kde-plasma/kwin/files/kwin-5.11.5-cmake-3.10.patch
+
+From cd544890ced4192d07467c89e23adbb62d8cea5c Mon Sep 17 00:00:00 2001
+From: Milian Wolff <mail@milianw.de>
+Date: Mon, 18 Dec 2017 11:40:35 +0100
+Subject: Fix build with CMake 3.10
+
+Looks like a classic false-positive, but this makes the compile
+pass for me without making the code harder to read:
+
+AutoMoc error
+-------------
+ "/ssd/milian/projects/kf5/src/kde/workspace/kwin/kcmkwin/kwinscripts/main.cpp"
+The file contains a K_PLUGIN_FACTORY macro, but does not include "main.moc"!
+Consider to
+ - add #include "main.moc"
+ - enable SKIP_AUTOMOC for this file
+
+So we just add the include and then get rid of the duplicate
+definition of the plugin factory and the problem is resolved.
+---
+ kcmkwin/kwinscripts/main.cpp | 2 ++
+ kcmkwin/kwinscripts/module.cpp | 2 --
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/kcmkwin/kwinscripts/main.cpp b/kcmkwin/kwinscripts/main.cpp
+index f5ee04b..baa5175 100644
+--- a/kcmkwin/kwinscripts/main.cpp
++++ b/kcmkwin/kwinscripts/main.cpp
+@@ -22,3 +22,5 @@
+
+ K_PLUGIN_FACTORY(KcmKWinScriptsFactory,
+ registerPlugin<Module>("kwin-scripts");)
++
++#include "main.moc"
+diff --git a/kcmkwin/kwinscripts/module.cpp b/kcmkwin/kwinscripts/module.cpp
+index a0d698e..ccf7d41 100644
+--- a/kcmkwin/kwinscripts/module.cpp
++++ b/kcmkwin/kwinscripts/module.cpp
+@@ -40,8 +40,6 @@
+
+ #include "version.h"
+
+-K_PLUGIN_FACTORY_DECLARATION(KcmKWinScriptsFactory)
+-
+ Module::Module(QWidget *parent, const QVariantList &args) :
+ KCModule(parent, args),
+ ui(new Ui::Module),
+--
+cgit v0.11.2
+
diff --git a/kde/patch/kwin/kwin_qt59_rootwindow_events.patch b/kde/patch/kwin/kwin_qt59_rootwindow_events.patch
new file mode 100644
index 0000000..178d081
--- /dev/null
+++ b/kde/patch/kwin/kwin_qt59_rootwindow_events.patch
@@ -0,0 +1,63 @@
+From a6dee74ee455d1da47dd5c9d55a84adbb5e1426a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Martin=20Fl=C3=B6ser?= <mgraesslin@kde.org>
+Date: Sun, 18 Jun 2017 14:23:33 +0200
+Subject: Workaround Qt regression of no longer delivering events for the root
+ window
+
+Summary:
+With qtbase 2b34aefcf02f09253473b096eb4faffd3e62b5f4 we do no longer get
+events reported for the X11 root window. Our keyboard handling in effects
+like PresentWindows and DesktopGrid relied on that.
+
+This change works around the regression by calling winId() on
+qApp->desktop() as suggested in the change. This is a short term solution
+for the 5.10 branch.
+
+This needs to be addressed properly by no longer relying on Qt in this
+area. KWin already does not rely on Qt for Wayland in that area and is
+able to compose the QKeyEvents. This should also be done on X11. It just
+needs some more hook up code for xkb, but that's needed anyway to improve
+modifier only shortcuts and friends.
+
+BUG: 360841
+FIXED-IN: 5.10.3
+
+Reviewers: #kwin, #plasma
+
+Subscribers: plasma-devel, kwin
+
+Tags: #kwin
+
+Differential Revision: https://phabricator.kde.org/D6258
+---
+ effects.cpp | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/effects.cpp b/effects.cpp
+index d2c4768..8155de6 100644
+--- a/effects.cpp
++++ b/effects.cpp
+@@ -48,6 +48,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #include "kwinglutils.h"
+
+ #include <QDebug>
++#include <QDesktopWidget>
+
+ #include <Plasma/Theme>
+
+@@ -599,6 +600,11 @@ bool EffectsHandlerImpl::grabKeyboard(Effect* effect)
+ bool ret = grabXKeyboard();
+ if (!ret)
+ return false;
++ // Workaround for Qt 5.9 regression introduced with 2b34aefcf02f09253473b096eb4faffd3e62b5f4
++ // we no longer get any events for the root window, one needs to call winId() on the desktop window
++ // TODO: change effects event handling to create the appropriate QKeyEvent without relying on Qt
++ // as it's done already in the Wayland case.
++ qApp->desktop()->winId();
+ }
+ keyboard_grab_effect = effect;
+ return true;
+--
+cgit v0.11.2
+
+
diff --git a/kde/patch/kwin/kwin_replace_logind_with_ck2.patch b/kde/patch/kwin/kwin_replace_logind_with_ck2.patch
new file mode 100644
index 0000000..294a691
--- /dev/null
+++ b/kde/patch/kwin/kwin_replace_logind_with_ck2.patch
@@ -0,0 +1,85 @@
+From: Eric Koegel <eric.koegel@gmail.com>
+Date: Sun, 24 Jul 2016 14:37:26 +0300
+
+Trivial patch for testing the CK2 session controller interface
+as a replacement for systemd-logind;
+Eric Koegel's original patch was rebased to kwin-5.10.2 by Eric Hameleers
+
+diff -uar kwin-5.10.2.orig/logind.cpp kwin-5.10.2/logind.cpp
+--- kwin-5.10.2.orig/logind.cpp 2017-06-13 20:19:37.000000000 +0200
++++ kwin-5.10.2/logind.cpp 2017-06-18 20:49:56.018661568 +0200
+@@ -58,10 +58,10 @@
+ namespace KWin
+ {
+
+-const static QString s_login1Service = QStringLiteral("org.freedesktop.login1");
+-const static QString s_login1Path = QStringLiteral("/org/freedesktop/login1");
+-const static QString s_login1ManagerInterface = QStringLiteral("org.freedesktop.login1.Manager");
+-const static QString s_login1SessionInterface = QStringLiteral("org.freedesktop.login1.Session");
++const static QString s_login1Service = QStringLiteral("org.freedesktop.ConsoleKit");
++const static QString s_login1Path = QStringLiteral("/org/freedesktop/ConsoleKit/Manager");
++const static QString s_login1ManagerInterface = QStringLiteral("org.freedesktop.ConsoleKit.Manager");
++const static QString s_login1SessionInterface = QStringLiteral("org.freedesktop.ConsoleKit.Session");
+ const static QString s_dbusPropertiesInterface = QStringLiteral("org.freedesktop.DBus.Properties");
+
+ LogindIntegration *LogindIntegration::s_self = nullptr;
+@@ -151,7 +151,7 @@
+ return;
+ }
+ if (!reply.isValid()) {
+- qCDebug(KWIN_CORE) << "The session is not registered with logind" << reply.error().message();
++ qCDebug(KWIN_CORE) << "The session is not registered with ConsoleKit2" << reply.error().message();
+ return;
+ }
+ m_sessionPath = reply.value().path();
+@@ -199,7 +199,7 @@
+ m_sessionPath,
+ s_dbusPropertiesInterface,
+ QStringLiteral("Get"));
+- message.setArguments(QVariantList({s_login1SessionInterface, QStringLiteral("Active")}));
++ message.setArguments(QVariantList({s_login1SessionInterface, QStringLiteral("active")}));
+ QDBusPendingReply<QVariant> reply = m_bus.asyncCall(message);
+ QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(reply, this);
+ connect(watcher, &QDBusPendingCallWatcher::finished, this,
+@@ -207,7 +207,7 @@
+ QDBusPendingReply<QVariant> reply = *self;
+ self->deleteLater();
+ if (!reply.isValid()) {
+- qCDebug(KWIN_CORE) << "Failed to get Active Property of logind session:" << reply.error().message();
++ qCDebug(KWIN_CORE) << "Failed to get Active Property of ConsoleKit2 session:" << reply.error().message();
+ return;
+ }
+ const bool active = reply.value().toBool();
+@@ -236,7 +236,7 @@
+ QDBusPendingReply<QVariant> reply = *self;
+ self->deleteLater();
+ if (!reply.isValid()) {
+- qCDebug(KWIN_CORE) << "Failed to get VTNr Property of logind session:" << reply.error().message();
++ qCDebug(KWIN_CORE) << "Failed to get VTNr Property of ConsoleKit2 session:" << reply.error().message();
+ return;
+ }
+ const int vt = reply.value().toUInt();
+@@ -365,12 +365,12 @@
+ QDBusPendingReply<QVariant> reply = *self;
+ self->deleteLater();
+ if (!reply.isValid()) {
+- qCDebug(KWIN_CORE) << "Failed to get Seat Property of logind session:" << reply.error().message();
++ qCDebug(KWIN_CORE) << "Failed to get Seat Property of ConsoleKit2 session:" << reply.error().message();
+ return;
+ }
+ DBusLogindSeat seat = qdbus_cast<DBusLogindSeat>(reply.value().value<QDBusArgument>());
+ const QString seatPath = seat.path.path();
+- qCDebug(KWIN_CORE) << "Logind seat:" << seat.name << "/" << seatPath;
++ qCDebug(KWIN_CORE) << "ConsoleKit2 seat:" << seat.name << "/" << seatPath;
+ if (m_seatPath != seatPath) {
+ m_seatPath = seatPath;
+ }
+@@ -385,7 +385,7 @@
+ }
+ QDBusMessage message = QDBusMessage::createMethodCall(s_login1Service,
+ m_seatPath,
+- QStringLiteral("org.freedesktop.login1.Seat"),
++ QStringLiteral("org.freedesktop.ConsoleKit.Seat"),
+ QStringLiteral("SwitchTo"));
+ message.setArguments(QVariantList{vtNr});
+ m_bus.asyncCall(message);