Skip to content

input: fix touch input getting borked on internal window close when touched

Amphetamine Wei requested to merge amphetaminewei/kwin:master-dev into master

If the internal window close but still touch, internalPressId will never be reset. So we reset internalPressId if the id of new touch sequence is same as internalPressId.

I don't know if doing this is a better option:


bool InternalWindowEventFilter::touchUp(qint32 id, const QPointF &pos, quint32 time)
{
...
    if (!input()->touch()->focus() || !input()->touch()->focus()->isInternal()) {
        // reset InternalPressId if focus() close or focus() is no longer internal
        m_lastGlobalTouchPos = QPointF();
        m_lastLocalTouchPos = QPointF();
        input()->touch()->setInternalPressId(-1);
        return removed;
    }
...
}

Merge request reports

Loading