summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2020-02-11 23:36:54 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-02-12 06:57:15 +0100
commit2ce99d12771407631288af5a12fe2165ae3599d8 (patch)
treebeea7402ffc1a2fff3ddd7e7715e2a780b889885
parentfe75ce648c53e641048fe1fcd416868b784860e5 (diff)
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@collabora.co.uk>
-rw-r--r--vcl/unx/gtk3/gtk3gtkframe.cxx5
1 files changed, 2 insertions, 3 deletions
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;
}