summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2021-09-17 10:02:24 +0200
committerLiang Qi <liang.qi@qt.io>2021-09-17 13:32:00 +0200
commitbb4b40b7e1b7cc0af2f0c74a991edf39d64cac06 (patch)
tree4178f9f00dbc100b551c21576f0a4bc7d6254e61 /src/plugins/platforms/xcb
parentfae419a8e61235e40c380cf81f9952661078b2de (diff)
Revert "Qt xcb: remove false detects of Qt::GroupSwitchModifier"
This reverts commit 25a7034d78aeb12726a1052d64c0aa3314a1f69d. The change makes the 5th modifier key broken, which is more serious than Backspace key doesn't work in CapsLock on. And we don't have a better solution for both of them now, perhaps it's better to keep the old behavior in 6.2 LTS. Task-number: QTBUG-49771 Fixes: QTBUG-95108 Fixes: QTBUG-95289 Pick-to: 6.2 6.2.0 5.15 Change-Id: Ie5d0aafa562b5097e089cafc83ae227c75c6d752 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb')
-rw-r--r--src/plugins/platforms/xcb/qxcbkeyboard.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/platforms/xcb/qxcbkeyboard.cpp b/src/plugins/platforms/xcb/qxcbkeyboard.cpp
index 7495d0fdc3..9ab804ca1b 100644
--- a/src/plugins/platforms/xcb/qxcbkeyboard.cpp
+++ b/src/plugins/platforms/xcb/qxcbkeyboard.cpp
@@ -60,11 +60,11 @@ Qt::KeyboardModifiers QXcbKeyboard::translateModifiers(int s) const
ret |= Qt::ShiftModifier;
if (s & XCB_MOD_MASK_CONTROL)
ret |= Qt::ControlModifier;
- if ((s & rmod_masks.alt) == rmod_masks.alt)
+ if (s & rmod_masks.alt)
ret |= Qt::AltModifier;
- if ((s & rmod_masks.meta) == rmod_masks.meta)
+ if (s & rmod_masks.meta)
ret |= Qt::MetaModifier;
- if ((s & rmod_masks.altgr) == rmod_masks.altgr)
+ if (s & rmod_masks.altgr)
ret |= Qt::GroupSwitchModifier;
return ret;
}