[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.
This commit is contained in:
parent
0c0ad87caf
commit
a687a58e82
1 changed files with 11 additions and 0 deletions
11
input.cpp
11
input.cpp
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue