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
This commit is contained in:
Bhavisha Dhruve 2016-06-03 16:44:25 +05:30
parent 67b869218f
commit 6cae5f7ab9

View file

@ -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);