diff options
author | David Edmundson <davidedmundson@kde.org> | 2022-08-05 15:00:31 +0100 |
---|---|---|
committer | David Edmundson <davidedmundson@kde.org> | 2022-09-05 11:52:00 +0100 |
commit | dbdcd92363b44d89440dcb195d8cb9e6c34f0ddf (patch) | |
tree | 58c1b9ef10c82b406c5f717641d26a12247dcbac /src | |
parent | 4be36e9a413dd763ae65dd890a141d9f28fb5464 (diff) |
Client: clear focus on touch cancel
When we get a touch_cancel event all touches should be treated as
lifted.
The next frame call focus is set, with no pending touch points but
without having gone through touch_up. We call mPendingTouchPoints.last()
without guards even though it is potentially now empty.
Change-Id: I3719f9507c5d397d8641692271d878076b7c23b8
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/client/qwaylandinputdevice.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp index c531699a6..9ff63b3b5 100644 --- a/src/client/qwaylandinputdevice.cpp +++ b/src/client/qwaylandinputdevice.cpp @@ -1412,6 +1412,7 @@ void QWaylandInputDevice::Touch::touch_cancel() if (touchExt) touchExt->touchCanceled(); + mFocus = nullptr; QWindowSystemInterface::handleTouchCancelEvent(nullptr, mParent->mTouchDevice); } |