fix: click item is ignored

Change-Id: I7ef7f440d59bb7a75ad50d5a9c85f6084c4704bf
This commit is contained in:
listenerri 2018-11-30 17:47:08 +08:00
parent fd3f502529
commit 5e9886fa97
Notes: gerrit 2018-11-30 18:21:24 +08:00
Verified+1: <jenkins@deepin.com>
Code-Review+2: listenerri <listenerri@gmail.com>
Submitted-by: listenerri <listenerri@gmail.com>
Submitted-at: Fri, 30 Nov 2018 18:21:23 +0800
Reviewed-on: https://cr.deepin.io/40193
Project: dde/dde-dock
Branch: refs/heads/master
2 changed files with 2 additions and 2 deletions

View File

@ -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;
}

View File

@ -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;
}