Only send key press events to the moving client
The invoked method is called keyPressEvent, thus it should not get key release events. Before each key event was handled twice.
This commit is contained in:
parent
2a935c523f
commit
bdb423da3d
1 changed files with 7 additions and 4 deletions
11
input.cpp
11
input.cpp
|
@ -1004,10 +1004,13 @@ void InputRedirection::processKeyboardKey(uint32_t key, InputRedirection::Keyboa
|
|||
}
|
||||
if (workspace()) {
|
||||
if (AbstractClient *c = workspace()->getMovingClient()) {
|
||||
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);
|
||||
// TODO: handle key repeat
|
||||
if (state == KeyboardKeyPressed) {
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue