Commit d56b75f6 authored by Martin Flöser's avatar Martin Flöser

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.
parent a65b2c06
......@@ -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);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment