summaryrefslogtreecommitdiffstats
path: root/kde
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2017-06-25 12:51:11 +0200
committer Eric Hameleers <alien@slackware.com>2017-06-25 12:51:11 +0200
commit92e90f9bb4fa80f7d1feff83956e176a6da2fabb (patch)
tree04a6f3ab36701378cdc3fd66dbdbe28bab81801f /kde
parent73da4f7f4b74a1dec89ccfe201d3ec69fb700218 (diff)
downloadktown-92e90f9bb4fa80f7d1feff83956e176a6da2fabb.tar.gz
ktown-92e90f9bb4fa80f7d1feff83956e176a6da2fabb.tar.xz
Apply workaround in kwin for regression in qt 5.9
Additionally, apply a trivial patch for testing the CK2 session controller interface as a replacement for systemd-logind; this is not yet useful but will be, once I get the Wayland compositor to work.
Diffstat (limited to 'kde')
-rw-r--r--kde/patch/kwin.patch8
-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, 156 insertions, 0 deletions
diff --git a/kde/patch/kwin.patch b/kde/patch/kwin.patch
new file mode 100644
index 0000000..b3de204
--- /dev/null
+++ b/kde/patch/kwin.patch
@@ -0,0 +1,8 @@
+# Trivial patch for testing the CK2 session controller interface
+# as a replacement for systemd-logind;
+cat $CWD/patch/kwin/kwin_replace_logind_with_ck2.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
+# Workaround Qt regression no longer delivering events for the root window.
+# Fixed in kwin 5.10.3.
+cat $CWD/patch/kwin/kwin_qt59_rootwindow_events.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
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);