diff --git a/frame/item/appitem.cpp b/frame/item/appitem.cpp index 65da949bd..cf5478f75 100644 --- a/frame/item/appitem.cpp +++ b/frame/item/appitem.cpp @@ -295,7 +295,7 @@ void AppItem::mouseReleaseEvent(QMouseEvent *e) playSwingEffect(); } else if (e->button() == Qt::LeftButton) { - if (checkAndResetTapHoldGestureState()) { + if (checkAndResetTapHoldGestureState() && e->source() == Qt::MouseEventSynthesizedByQt) { qDebug() << "tap and hold gesture detected, ignore the synthesized mouse release event"; return; } diff --git a/frame/item/pluginsitem.cpp b/frame/item/pluginsitem.cpp index 3d55cde9e..7c22e2521 100644 --- a/frame/item/pluginsitem.cpp +++ b/frame/item/pluginsitem.cpp @@ -149,7 +149,7 @@ void PluginsItem::mouseReleaseEvent(QMouseEvent *e) if (e->button() != Qt::LeftButton) return; - if (checkAndResetTapHoldGestureState()) { + if (checkAndResetTapHoldGestureState()&& e->source() == Qt::MouseEventSynthesizedByQt) { qDebug() << "tap and hold gesture detected, ignore the synthesized mouse release event"; return; }