[Libreoffice-commits] core.git: vcl/unx

Maxim Monastirsky (via logerrit) logerrit at kemper.freedesktop.org
Wed Feb 12 05:57:47 UTC 2020


 vcl/unx/gtk3/gtk3gtkframe.cxx |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 2ce99d12771407631288af5a12fe2165ae3599d8
Author:     Maxim Monastirsky <momonasmon at gmail.com>
AuthorDate: Tue Feb 11 23:36:54 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Feb 12 06:57:15 2020 +0100

    nModCode assigned but not used
    
    aModEvt.mnCode used to get the currently pressed keys
    before commit fe0451259d2fb93c809c1bfa3baf5abd90019c58
    ("tdf#103158 ctrl+shift should work on key up"). Now
    it gets the previously pressed ones, by ignoring the
    last nModCode assignment.
    
    My intention in the mentioned commit was to only change
    aModEvt.mnModKeyCode to also include the released key,
    and nothing else. So let's revert the unintentional
    change to aModEvt.mnCode.
    
    Change-Id: Ic182119e732b79bc494c73f9bd72959f75cc38b3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88484
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 85106bb86035..60886d3439e8 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -3188,17 +3188,16 @@ gboolean GtkSalFrame::signalKey(GtkWidget* pWidget, GdkEventKey* pEvent, gpointe
 
         SalKeyModEvent aModEvt;
         aModEvt.mbDown = pEvent->type == GDK_KEY_PRESS;
-        aModEvt.mnCode = nModCode;
 
         if( pEvent->type == GDK_KEY_RELEASE )
         {
             aModEvt.mnModKeyCode = pThis->m_nKeyModifiers;
-            nModCode &= ~nModMask;
+            aModEvt.mnCode = nModCode & ~nModMask;
             pThis->m_nKeyModifiers &= ~nExtModMask;
         }
         else
         {
-            nModCode |= nModMask;
+            aModEvt.mnCode = nModCode | nModMask;
             pThis->m_nKeyModifiers |= nExtModMask;
             aModEvt.mnModKeyCode = pThis->m_nKeyModifiers;
         }


More information about the Libreoffice-commits mailing list