[wayland] Perform mouse command on AbstractClients on touch down

If the touch window changes we simulate a left press and perform
the mouse command for a left button.

Note: this is not yet tested on real system.
icc-effect-5.14.5
Martin Gräßlin 2015-07-09 16:31:55 +02:00
parent 0c0ad87caf
commit a687a58e82
1 changed files with 11 additions and 0 deletions

View File

@ -932,6 +932,17 @@ void InputRedirection::processTouchDown(qint32 id, const QPointF &pos, quint32 t
seat->setTimestamp(time);
if (!seat->isTouchSequence()) {
updateTouchWindow(pos);
if (AbstractClient *c = dynamic_cast<AbstractClient*>(m_touchWindow.data())) {
// perform same handling as if it were a left click
bool wasAction = false;
const Options::MouseCommand command = c->getMouseCommand(Qt::LeftButton, &wasAction);
if (wasAction) {
// if no replay we filter out this touch point
if (!c->performMouseCommand(command, pos.toPoint())) {
return;
}
}
}
}
m_touchIdMapper.insert(id, seat->touchDown(pos));
}