summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-11-16 10:57:14 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-11-16 13:59:09 +0100
commit7fdcc2d3f218def3b3166cdbfa83154e68e00b4b (patch)
treec0059543b5262af35f44dcb9d6c915cab6f6ba6c
parentaf1b9bf6e1a5d9622faa81ae2e2ddb1cf26153f8 (diff)
Related: tdf#142706 mask with GDK_MODIFIER_MASK to ignore unwanted bits
Change-Id: I6d3f6fb6e9385b8077c23d5b7f78c43d9fb7b9d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125295 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--vcl/unx/gtk3/gtkinst.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 3a7b2f86fd72..93035fd27cbb 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -17687,7 +17687,8 @@ void GtkInstanceDrawingArea::im_context_set_cursor_location(const tools::Rectang
#if !GTK_CHECK_VERSION(4, 0, 0)
static gboolean signalEntryInsertSpecialCharKeyPress(GtkEntry* pEntry, GdkEventKey* pEvent, gpointer)
{
- if ((pEvent->keyval == GDK_KEY_S || pEvent->keyval == GDK_KEY_s) && pEvent->state == static_cast<GdkModifierType>(GDK_SHIFT_MASK|GDK_CONTROL_MASK))
+ if ((pEvent->keyval == GDK_KEY_S || pEvent->keyval == GDK_KEY_s) &&
+ (pEvent->state & GDK_MODIFIER_MASK) == static_cast<GdkModifierType>(GDK_SHIFT_MASK|GDK_CONTROL_MASK))
{
if (auto pImplFncGetSpecialChars = vcl::GetGetSpecialCharsFunction())
{