kde-frameworks/kxmlgui/files/kxmlgui-5.77.0-fix-key-recording.patch
changeset 3 fc1bbb6157eb
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/kde-frameworks/kxmlgui/files/kxmlgui-5.77.0-fix-key-recording.patch	Wed Jan 13 08:54:21 2021 +0000
@@ -0,0 +1,29 @@
+From 1bd9ac05b0eed3582937829150b31ea48fd95bb0 Mon Sep 17 00:00:00 2001
+From: Weng Xuetian <wengxt@gmail.com>
+Date: Thu, 17 Dec 2020 11:12:40 -0800
+Subject: [PATCH] Fix key recording by setWindow before capture starts.
+
+It is common that during the construction of widget, it is not yet added to
+a window. Thus windowHandle will simply return null in this case. Always set
+the window to before the capture starts.
+
+BUG: 430388
+---
+ src/kkeysequencewidget.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/kkeysequencewidget.cpp b/src/kkeysequencewidget.cpp
+index a51c6cc..c1f5c42 100644
+--- a/src/kkeysequencewidget.cpp
++++ b/src/kkeysequencewidget.cpp
+@@ -493,6 +493,7 @@ void KKeySequenceWidget::setCheckActionCollections(const QList<KActionCollection
+ //slot
+ void KKeySequenceWidget::captureKeySequence()
+ {
++    d->recorder->setWindow(window()->windowHandle());
+     d->recorder->startRecording();
+ }
+ 
+-- 
+GitLab
+