diff options
author | Joni Poikelin <joni.poikelin@theqtcompany.com> | 2016-04-01 10:52:37 +0300 |
---|---|---|
committer | Joni Poikelin <joni.poikelin@theqtcompany.com> | 2016-04-05 07:14:47 +0000 |
commit | 8c3e671239c83238fc036f8a94dde04920c43871 (patch) | |
tree | cdcaeef4a36298bc47d807e32912a3eeb0eda928 /src/plugins | |
parent | 08a62af7c58927c37a92a5749bc87be1ae3d6d2d (diff) |
Fix assert with Meta modifier
Meta modifier is not found in some configurations which triggers an
assert. Instead of assert, ignore the modifier if it is not found.
Task-number: QTBUG-52298
Change-Id: I258cee4014a30162afebb423eadaf07ef0ed6a1f
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbkeyboard.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/platforms/xcb/qxcbkeyboard.cpp b/src/plugins/platforms/xcb/qxcbkeyboard.cpp index 631dd17908..1eeb59a665 100644 --- a/src/plugins/platforms/xcb/qxcbkeyboard.cpp +++ b/src/plugins/platforms/xcb/qxcbkeyboard.cpp @@ -996,7 +996,6 @@ QList<int> QXcbKeyboard::possibleKeys(const QKeyEvent *event) const Q_ASSERT(shiftMod < 32); Q_ASSERT(altMod < 32); Q_ASSERT(controlMod < 32); - Q_ASSERT(metaMod < 32); xkb_mod_mask_t depressed; int qtKey = 0; @@ -1017,7 +1016,7 @@ QList<int> QXcbKeyboard::possibleKeys(const QKeyEvent *event) const depressed |= (1 << shiftMod); if (neededMods & Qt::ControlModifier) depressed |= (1 << controlMod); - if (neededMods & Qt::MetaModifier) + if (metaMod < 32 && neededMods & Qt::MetaModifier) depressed |= (1 << metaMod); xkb_state_update_mask(kb_state, depressed, latchedMods, lockedMods, 0, 0, lockedLayout); sym = xkb_state_key_get_one_sym(kb_state, keycode); |