Qt xcb: remove false detects of Qt::GroupSwitchModifier
In some cases, if X11 is configured with CapsLock as keyboard language switch key, and CapsLock is toggled via Shift+CapsLock key combination, toggled CapsLock is falsely detected as Qt::GroupSwitchModifier for subsequent key events. This change fixes this false detect, but doesn't fix detection of Qt::GroupSwitchModifier which is likely still broken. Fixes: QTBUG-49771 Change-Id: I485e2d4f3c654707c62adaba367c1b8afb3fc36c Reviewed-by: Liang Qi <liang.qi@qt.io> (cherry picked from commit 25a7034d78aeb12726a1052d64c0aa3314a1f69d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
9fe4effc44
commit
e6d4a052a6
@ -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)
|
||||
if ((s & rmod_masks.alt) == rmod_masks.alt)
|
||||
ret |= Qt::AltModifier;
|
||||
if (s & rmod_masks.meta)
|
||||
if ((s & rmod_masks.meta) == rmod_masks.meta)
|
||||
ret |= Qt::MetaModifier;
|
||||
if (s & rmod_masks.altgr)
|
||||
if ((s & rmod_masks.altgr) == rmod_masks.altgr)
|
||||
ret |= Qt::GroupSwitchModifier;
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user