Process TOUCH_CANCEL events from libinput individually
This fixes a bug where cancelled touch sequences get ignored which results in stuck touch focus.icc-effect-5.26.4
parent
a4fb852a94
commit
3c23194037
|
@ -2326,7 +2326,7 @@ void InputRedirection::setupLibInput()
|
|||
connect(conn, &LibInput::Connection::touchDown, m_touch, &TouchInputRedirection::processDown);
|
||||
connect(conn, &LibInput::Connection::touchUp, m_touch, &TouchInputRedirection::processUp);
|
||||
connect(conn, &LibInput::Connection::touchMotion, m_touch, &TouchInputRedirection::processMotion);
|
||||
connect(conn, &LibInput::Connection::touchCanceled, m_touch, &TouchInputRedirection::cancel);
|
||||
connect(conn, &LibInput::Connection::touchCanceled, m_touch, &TouchInputRedirection::processCancel);
|
||||
connect(conn, &LibInput::Connection::touchFrame, m_touch, &TouchInputRedirection::frame);
|
||||
auto handleSwitchEvent = [this] (SwitchEvent::State state, quint32 time, quint64 timeMicroseconds, LibInput::Device *device) {
|
||||
SwitchEvent event(state, time, timeMicroseconds, device);
|
||||
|
|
|
@ -201,6 +201,12 @@ void TouchInputRedirection::processMotion(qint32 id, const QPointF &pos, quint32
|
|||
m_windowUpdatedInCycle = false;
|
||||
}
|
||||
|
||||
void TouchInputRedirection::processCancel()
|
||||
{
|
||||
m_touches--;
|
||||
cancel();
|
||||
}
|
||||
|
||||
void TouchInputRedirection::cancel()
|
||||
{
|
||||
if (!inited()) {
|
||||
|
|
|
@ -46,6 +46,7 @@ public:
|
|||
void processDown(qint32 id, const QPointF &pos, quint32 time, LibInput::Device *device = nullptr);
|
||||
void processUp(qint32 id, quint32 time, LibInput::Device *device = nullptr);
|
||||
void processMotion(qint32 id, const QPointF &pos, quint32 time, LibInput::Device *device = nullptr);
|
||||
void processCancel();
|
||||
void cancel();
|
||||
void frame();
|
||||
|
||||
|
|
Loading…
Reference in New Issue