[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
parent
0c0ad87caf
commit
a687a58e82
11
input.cpp
11
input.cpp
|
@ -932,6 +932,17 @@ void InputRedirection::processTouchDown(qint32 id, const QPointF &pos, quint32 t
|
||||||
seat->setTimestamp(time);
|
seat->setTimestamp(time);
|
||||||
if (!seat->isTouchSequence()) {
|
if (!seat->isTouchSequence()) {
|
||||||
updateTouchWindow(pos);
|
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));
|
m_touchIdMapper.insert(id, seat->touchDown(pos));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue