public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/kwin] f45: Added two upstream patches, and added a missing runtime dep
@ 2026-11-23 14:46 Steve Cossette
  0 siblings, 0 replies; only message in thread
From: Steve Cossette @ 2026-11-23 14:46 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/kwin
Branch : f45
Commit : 8a802224334aaab7373a463e67818418584e7624
Author : Steve Cossette <farchord@gmail.com>
Date   : 2026-11-23T08:53:53-05:00
Stats  : +174/-1 in 3 file(s)
URL    : https://src.fedoraproject.org/rpms/kwin/c/8a802224334aaab7373a463e67818418584e7624?branch=f45

Log:
Added two upstream patches, and added a missing runtime dep

---
diff --git a/19404161bc367b87b794361915b85a14c034ec63.patch b/19404161bc367b87b794361915b85a14c034ec63.patch
new file mode 100644
index 0000000..1166cbd
--- /dev/null
+++ b/19404161bc367b87b794361915b85a14c034ec63.patch
@@ -0,0 +1,46 @@
+From 19404161bc367b87b794361915b85a14c034ec63 Mon Sep 17 00:00:00 2001
+From: Xaver Hugl <xaver.hugl@kde.org>
+Date: Tue, 17 Nov 2026 10:37:29 +0100
+Subject: [PATCH] input: only init backends after InputRedirection
+
+And more importantly, after the input redirection global has been set.
+Doing it in the constructor means that input backends potentially sending
+events during their initialization, where code may access the input direction
+and crash if it's not a valid pointer yet.
+
+This should fix https://crash-reports.kde.org/organizations/kde/share/issue/5b82c563178f416d9756b730bb226735/
+
+BUG: 528824
+
+
+(cherry picked from commit a96ceac71f3948b165e152dfc78aa964677e20aa)
+
+Co-authored-by: Xaver Hugl <xaver.hugl@kde.org>
+---
+ src/input.cpp | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/src/input.cpp b/src/input.cpp
+index 327e713bc32..76e082954ab 100644
+--- a/src/input.cpp
++++ b/src/input.cpp
+@@ -2935,8 +2935,6 @@ InputRedirection::InputRedirection(QObject *parent)
+     , m_shortcuts(new GlobalShortcutsManager(this))
+ #endif
+ {
+-    setupInputBackends();
+-
+     connect(kwinApp(), &Application::workspaceCreated, this, &InputRedirection::setupWorkspace);
+ }
+ 
+@@ -2983,6 +2981,7 @@ void InputRedirection::init()
+ #if KWIN_BUILD_GLOBALSHORTCUTS
+     m_shortcuts->init();
+ #endif
++    setupInputBackends();
+ }
+ 
+ void InputRedirection::setupWorkspace()
+-- 
+GitLab
+

diff --git a/47f038220448a57e3b071b9d1d70c835e7387128.patch b/47f038220448a57e3b071b9d1d70c835e7387128.patch
new file mode 100644
index 0000000..5ee9012
--- /dev/null
+++ b/47f038220448a57e3b071b9d1d70c835e7387128.patch
@@ -0,0 +1,116 @@
+From 47f038220448a57e3b071b9d1d70c835e7387128 Mon Sep 17 00:00:00 2001
+From: Xaver Hugl <xaver.hugl@kde.org>
+Date: Sat, 21 Nov 2026 02:00:06 +0100
+Subject: [PATCH] backends/libinput: only process device add events on startup
+
+Since things like switch state are only communicated through events and can't
+be queried, we need to delay non-ADDED events until the rest of KWin is set up
+and has created the appropriate input event filters.
+
+BUG: 528936
+
+
+(cherry picked from commit 9f867631fb33f114650d7ce7c152dff9bddc9e04)
+
+Co-authored-by: Xaver Hugl <xaver.hugl@kde.org>
+---
+ src/backends/libinput/connection.cpp | 48 ++++++++++++++++++----------
+ src/backends/libinput/connection.h   |  2 ++
+ 2 files changed, 33 insertions(+), 17 deletions(-)
+
+diff --git a/src/backends/libinput/connection.cpp b/src/backends/libinput/connection.cpp
+index 4966e7ce172..ba9dcb51661 100644
+--- a/src/backends/libinput/connection.cpp
++++ b/src/backends/libinput/connection.cpp
+@@ -137,7 +137,16 @@ void Connection::setup()
+     // NOTE We need the initial device list for the startup of other parts of KWin,
+     // like tablet mode and output configuration
+     QMetaObject::invokeMethod(this, &Connection::doSetup, Qt::BlockingQueuedConnection);
+-    processEvents();
++    QMutexLocker locker(&m_mutex);
++    for (auto it = m_eventQueue.begin(); it != m_eventQueue.end();) {
++        auto &event = *it;
++        if (event->type() == LIBINPUT_EVENT_DEVICE_ADDED) {
++            addDevice(event->nativeDevice());
++            it = m_eventQueue.erase(it);
++        } else {
++            it++;
++        }
++    }
+ }
+ 
+ void Connection::doSetup()
+@@ -269,22 +278,7 @@ void Connection::processEvents()
+         m_eventQueue.pop_front();
+         switch (event->type()) {
+         case LIBINPUT_EVENT_DEVICE_ADDED: {
+-            auto device = new Device(event->nativeDevice());
+-            device->moveToThread(thread());
+-            m_devices << device;
+-
+-            applyDeviceConfig(device);
+-            applyScreenToDevice(device);
+-
+-            connect(device, &Device::outputNameChanged, this, [this, device] {
+-                // If the output name changes from something to empty we need to
+-                // re-run the assignment heuristic so that an output is assigned
+-                if (device->outputName().isEmpty()) {
+-                    applyScreenToDevice(device);
+-                }
+-            });
+-
+-            Q_EMIT deviceAdded(device);
++            addDevice(event->nativeDevice());
+             break;
+         }
+         case LIBINPUT_EVENT_DEVICE_REMOVED: {
+@@ -618,6 +612,26 @@ void Connection::processEvents()
+     }
+ }
+ 
++void Connection::addDevice(libinput_device *nativeDevice)
++{
++    auto device = new Device(nativeDevice);
++    device->moveToThread(thread());
++    m_devices << device;
++
++    applyDeviceConfig(device);
++    applyScreenToDevice(device);
++
++    connect(device, &Device::outputNameChanged, this, [this, device] {
++        // If the output name changes from something to empty we need to
++        // re-run the assignment heuristic so that an output is assigned
++        if (device->outputName().isEmpty()) {
++            applyScreenToDevice(device);
++        }
++    });
++
++    Q_EMIT deviceAdded(device);
++}
++
+ void Connection::updateScreens()
+ {
+     QMutexLocker locker(&m_mutex);
+diff --git a/src/backends/libinput/connection.h b/src/backends/libinput/connection.h
+index 0eccd47358f..0dde61f104f 100644
+--- a/src/backends/libinput/connection.h
++++ b/src/backends/libinput/connection.h
+@@ -24,6 +24,7 @@ class QSocketNotifier;
+ class QThread;
+ 
+ struct libinput_tablet_tool;
++struct libinput_device;
+ 
+ namespace KWin
+ {
+@@ -82,6 +83,7 @@ private:
+     void applyScreenToDevice(Device *device);
+     void doSetup();
+     TabletTool *getOrCreateTool(libinput_tablet_tool *tool);
++    void addDevice(libinput_device *nativeDevice);
+ 
+     std::unique_ptr<QSocketNotifier> m_notifier;
+     QRecursiveMutex m_mutex;
+-- 
+GitLab
+

diff --git a/kwin.spec b/kwin.spec
index 9cacfe7..f9bba12 100644
--- a/kwin.spec
+++ b/kwin.spec
@@ -1,6 +1,6 @@
 Name:    kwin
 Version: 6.8.3
-Release: 1%{?dist}
+Release: 2%{?dist}
 Summary: KDE Window manager
 
 License: BSD-2-Clause AND BSD-3-Clause AND CC0-1.0 AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-only AND GPL-3.0-or-later AND LGPL-2.0-only AND LGPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND LGPL-3.0-only AND (GPL-2.0-only OR GPL-3.0-only) AND (LGPL-2.1-only OR LGPL-3.0-only) AND MIT
@@ -15,6 +15,13 @@ Source1: http://download.kde.org/%{stable_kf6}/plasma/%{maj_ver_kf6}.%{min_ver_k
 Source10: macros.kwin.in
 
 ## upstream patches
+# input: only init backends after InputRedirection
+# https://invent.kde.org/plasma/kwin/-/commit/19404161bc367b87b794361915b85a14c034ec63
+Patch0:         19404161bc367b87b794361915b85a14c034ec63.patch
+
+# backends/libinput: only process device add events on startup
+# https://invent.kde.org/plasma/kwin/-/commit/47f038220448a57e3b071b9d1d70c835e7387128
+Patch1:         47f038220448a57e3b071b9d1d70c835e7387128.patch
 
 
 ## proposed patches
@@ -124,6 +131,7 @@ Requires:       qt6-qtmultimedia%{?_isa}
 Requires:       qt6-qtdeclarative%{?_isa}
 Requires:       aurorae%{?_isa}
 Requires:       iio-sensor-proxy%{?_isa}
+Requires:       plasma-milou%{?_isa}
 
 # Before kwin was split out from kde-workspace into a subpackage
 Conflicts:      kde-workspace%{?_isa} < 4.11.14-2
@@ -293,6 +301,9 @@ sed -i \
 
 
 %changelog
+* Mon Nov 23 2026 Steve Cossette <farchord@gmail.com> - 6.8.3-2
+- Added two cherry-picked upstream patches
+
 * Thu Nov 12 2026 Steve Cossette <farchord@gmail.com> - 6.8.3-1
 - 6.8.3
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-23 14:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-23 14:46 [rpms/kwin] f45: Added two upstream patches, and added a missing runtime dep Steve Cossette

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox