|
|
|
@ -184,6 +184,25 @@ bool InputEventFilter::swipeGestureCancelled(quint32 time)
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool InputEventFilter::holdGestureBegin(int fingerCount, quint32 time)
|
|
|
|
|
{
|
|
|
|
|
Q_UNUSED(fingerCount)
|
|
|
|
|
Q_UNUSED(time)
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool InputEventFilter::holdGestureEnd(quint32 time)
|
|
|
|
|
{
|
|
|
|
|
Q_UNUSED(time)
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool InputEventFilter::holdGestureCancelled(quint32 time)
|
|
|
|
|
{
|
|
|
|
|
Q_UNUSED(time)
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool InputEventFilter::switchEvent(SwitchEvent *event)
|
|
|
|
|
{
|
|
|
|
|
Q_UNUSED(event)
|
|
|
|
@ -444,6 +463,17 @@ public:
|
|
|
|
|
// no touchpad multi-finger gestures on lock screen
|
|
|
|
|
return waylandServer()->isScreenLocked();
|
|
|
|
|
}
|
|
|
|
|
bool holdGestureBegin(int fingerCount, quint32 time) override {
|
|
|
|
|
Q_UNUSED(fingerCount)
|
|
|
|
|
Q_UNUSED(time)
|
|
|
|
|
// no touchpad multi-finger gestures on lock screen
|
|
|
|
|
return waylandServer()->isScreenLocked();
|
|
|
|
|
}
|
|
|
|
|
bool holdGestureEnd(quint32 time) override {
|
|
|
|
|
Q_UNUSED(time)
|
|
|
|
|
// no touchpad multi-finger gestures on lock screen
|
|
|
|
|
return waylandServer()->isScreenLocked();
|
|
|
|
|
}
|
|
|
|
|
private:
|
|
|
|
|
bool surfaceAllowed(KWaylandServer::SurfaceInterface *(KWaylandServer::SeatInterface::*method)() const) const {
|
|
|
|
|
if (KWaylandServer::SurfaceInterface *s = (waylandServer()->seat()->*method)()) {
|
|
|
|
@ -1561,6 +1591,27 @@ public:
|
|
|
|
|
seat->cancelPointerSwipeGesture();
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
bool holdGestureBegin(int fingerCount, quint32 time) override
|
|
|
|
|
{
|
|
|
|
|
auto seat = waylandServer()->seat();
|
|
|
|
|
seat->setTimestamp(time);
|
|
|
|
|
seat->startPointerHoldGesture(time);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
bool holdGestureEnd(quint32 time) override
|
|
|
|
|
{
|
|
|
|
|
auto seat = waylandServer()->seat();
|
|
|
|
|
seat->setTimestamp(time);
|
|
|
|
|
seat->endPointerHoldGesture();
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
bool holdGestureCancelled(quint32 time) override
|
|
|
|
|
{
|
|
|
|
|
auto seat = waylandServer()->seat();
|
|
|
|
|
seat->setTimestamp(time);
|
|
|
|
|
seat->cancelPointerHoldGesture();
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static KWaylandServer::SeatInterface *findSeat()
|
|
|
|
@ -2414,6 +2465,9 @@ void InputRedirection::setupLibInput()
|
|
|
|
|
connect(conn, &LibInput::Connection::swipeGestureUpdate, m_pointer, &PointerInputRedirection::processSwipeGestureUpdate);
|
|
|
|
|
connect(conn, &LibInput::Connection::swipeGestureEnd, m_pointer, &PointerInputRedirection::processSwipeGestureEnd);
|
|
|
|
|
connect(conn, &LibInput::Connection::swipeGestureCancelled, m_pointer, &PointerInputRedirection::processSwipeGestureCancelled);
|
|
|
|
|
connect(conn, &LibInput::Connection::holdGestureBegin, m_pointer, &PointerInputRedirection::processHoldGestureBegin);
|
|
|
|
|
connect(conn, &LibInput::Connection::holdGestureEnd, m_pointer, &PointerInputRedirection::processHoldGestureEnd);
|
|
|
|
|
connect(conn, &LibInput::Connection::holdGestureCancelled, m_pointer, &PointerInputRedirection::processHoldGestureCancelled);
|
|
|
|
|
connect(conn, &LibInput::Connection::keyChanged, m_keyboard, &KeyboardInputRedirection::processKey);
|
|
|
|
|
connect(conn, &LibInput::Connection::pointerMotion, m_pointer, &PointerInputRedirection::processMotion);
|
|
|
|
|
connect(conn, &LibInput::Connection::pointerMotionAbsolute, m_pointer, &PointerInputRedirection::processMotionAbsolute);
|
|
|
|
|