From a687a58e82a73955212f1fbc01498c3c9b341e98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Thu, 9 Jul 2015 16:31:55 +0200 Subject: [PATCH] [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. --- input.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/input.cpp b/input.cpp index e4ec1749ec..02f61cd0cd 100644 --- a/input.cpp +++ b/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(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)); }