From 6cae5f7ab9256b948796d94e03d8f106c21349b4 Mon Sep 17 00:00:00 2001 From: Bhavisha Dhruve Date: Fri, 3 Jun 2016 16:44:25 +0530 Subject: [PATCH] Integrated FakeInput touch events into InputRedirection. Summary: KWin counterpart for touch event support in Fakeinput interface. Reviewers: #plasma, graesslin Reviewed By: #plasma, graesslin Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D1758 --- input.cpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/input.cpp b/input.cpp index a4e2709347..393796014d 100644 --- a/input.cpp +++ b/input.cpp @@ -1021,6 +1021,34 @@ void InputRedirection::setupWorkspace() m_pointer->processAxis(axis, delta, 0); } ); + connect(device, &FakeInputDevice::touchDownRequested, this, + [this] (quint32 id, const QPointF &pos) { + // TODO: Fix time + m_touch->processDown(id, pos, 0); + } + ); + connect(device, &FakeInputDevice::touchMotionRequested, this, + [this] (quint32 id, const QPointF &pos) { + // TODO: Fix time + m_touch->processMotion(id, pos, 0); + } + ); + connect(device, &FakeInputDevice::touchUpRequested, this, + [this] (quint32 id) { + // TODO: Fix time + m_touch->processUp(id, 0); + } + ); + connect(device, &FakeInputDevice::touchCancelRequested, this, + [this] () { + m_touch->cancel(); + } + ); + connect(device, &FakeInputDevice::touchFrameRequested, this, + [this] () { + m_touch->frame(); + } + ); } ); connect(workspace(), &Workspace::configChanged, this, &InputRedirection::reconfigure);