Fix: Touch lose after touch ukui-window-switch

When you touch down to a internal window of kwin,
your system will lose touch feature if you close
the internal window but not touch up.
The ukui-window-switch is a internal window

https://gitee.com/openkylin/ukui-window-switch/issues/I5VI7P
This commit is contained in:
Wei Wei 2022-11-11 11:12:03 +08:00 committed by MouseZhang
parent 7682f61733
commit f0bdf47109
1 changed files with 6 additions and 0 deletions

View File

@ -1464,6 +1464,12 @@ class InternalWindowEventFilter : public InputEventFilter {
return false;
}
auto touch = input()->touch();
// If true means the InternalPressPoint touch sequence has finished but no touchUp()
if (touch->internalPressId() == id) {
touch->setInternalPressId(-1);
m_lastGlobalTouchPos = QPointF();
m_lastLocalTouchPos = QPointF();
}
if (touch->internalPressId() != -1) {
// already on internal window, ignore further touch points, but filter out
m_pressedIds.insert(id);