kde-frameworks/kxmlgui/files/kxmlgui-5.77.0-fix-key-recording.patch
changeset 5 bb9bed9cdc04
parent 4 8c829ec67afe
child 6 34fc7a87c4eb
equal deleted inserted replaced
4:8c829ec67afe 5:bb9bed9cdc04
     1 From 1bd9ac05b0eed3582937829150b31ea48fd95bb0 Mon Sep 17 00:00:00 2001
       
     2 From: Weng Xuetian <wengxt@gmail.com>
       
     3 Date: Thu, 17 Dec 2020 11:12:40 -0800
       
     4 Subject: [PATCH] Fix key recording by setWindow before capture starts.
       
     5 
       
     6 It is common that during the construction of widget, it is not yet added to
       
     7 a window. Thus windowHandle will simply return null in this case. Always set
       
     8 the window to before the capture starts.
       
     9 
       
    10 BUG: 430388
       
    11 ---
       
    12  src/kkeysequencewidget.cpp | 1 +
       
    13  1 file changed, 1 insertion(+)
       
    14 
       
    15 diff --git a/src/kkeysequencewidget.cpp b/src/kkeysequencewidget.cpp
       
    16 index a51c6cc..c1f5c42 100644
       
    17 --- a/src/kkeysequencewidget.cpp
       
    18 +++ b/src/kkeysequencewidget.cpp
       
    19 @@ -493,6 +493,7 @@ void KKeySequenceWidget::setCheckActionCollections(const QList<KActionCollection
       
    20  //slot
       
    21  void KKeySequenceWidget::captureKeySequence()
       
    22  {
       
    23 +    d->recorder->setWindow(window()->windowHandle());
       
    24      d->recorder->startRecording();
       
    25  }
       
    26  
       
    27 -- 
       
    28 GitLab
       
    29