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>
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 85106bb..60886d3 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;
}