Remove Keyboard modifiers from Qt::Key created in Xkb::toQtKey
The KWindowSystem change 32526718eae99ccb594360627586eebdf793372b caused a regression in KWin as Qt::Enter on keypad is no longer enter, but enter with modifier mask. For all other modifiers it was never a problem that the KKeyServer method also returned modifiers as it could not read the X modifiers anyway. As KWin has full knowledge about the modifiers through Xkb it does not need the modifier mapped into the Qt::Key. This fixes the failing TestWindowSelection autotest which started to fail due to the change in KWindowSystem.
This commit is contained in:
parent
a65b2c062c
commit
d56b75f636
1 changed files with 3 additions and 0 deletions
3
xkb.cpp
3
xkb.cpp
|
@ -446,6 +446,9 @@ Qt::Key Xkb::toQtKey(xkb_keysym_t keysym) const
|
|||
{
|
||||
int key = Qt::Key_unknown;
|
||||
KKeyServer::symXToKeyQt(keysym, &key);
|
||||
if (key & Qt::KeyboardModifierMask) {
|
||||
key &= ~Qt::KeyboardModifierMask;
|
||||
}
|
||||
return static_cast<Qt::Key>(key);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue