Fix moving windows in InputRedirection

* Need to pass modifiers to Client::keyPressEvent
* Need to check whether move/resize ended before updating position,
  otherwise it keeps stuck in move/resize after ending
This commit is contained in:
Martin Gräßlin 2015-08-21 10:49:06 +02:00
parent cfddaed6df
commit 73b8b3ec7b

View file

@ -860,8 +860,11 @@ void InputRedirection::processKeyboardKey(uint32_t key, InputRedirection::Keyboa
}
if (workspace()) {
if (Client *c = dynamic_cast<Client*>(workspace()->getMovingClient())) {
c->keyPressEvent(m_xkb->toQtKey(m_xkb->toKeysym(key)));
c->updateMoveResize(m_globalPointer);
c->keyPressEvent(m_xkb->toQtKey(m_xkb->toKeysym(key)) | m_xkb->modifiers());
if (c->isMove() || c->isResize()) {
// only update if mode didn't end
c->updateMoveResize(m_globalPointer);
}
return;
}
}