fix system tray popup menu not work

Change-Id: If439c356377d5ff47e617a2b8ffed99367113c8c
This commit is contained in:
石博文 2016-08-03 15:41:14 +08:00
parent 008a2858d9
commit 7518567ac5
Notes: Deepin Code Review 2016-08-03 07:55:25 +00:00
Verified+1: Anonymous Coward #1000004
Code-Review+2: 石博文 <sbw@sbw.so>
Submitted-by: 石博文 <sbw@sbw.so>
Submitted-at: Wed, 03 Aug 2016 07:55:24 +0000
Reviewed-on: https://cr.deepin.io/14896
Project: dde/dde-dock
Branch: refs/heads/master

View File

@ -72,11 +72,16 @@ void FashionTrayItem::mousePressEvent(QMouseEvent *e)
if (dis.manhattanLength() > std::min(width(), height()) / 2 * 0.8)
return QWidget::mousePressEvent(e);
if (e->button() != Qt::RightButton)
QWidget::mousePressEvent(e);
m_pressPoint = e->pos();
}
void FashionTrayItem::mouseReleaseEvent(QMouseEvent *e)
{
QWidget::mouseReleaseEvent(e);
const QPoint point = e->pos() - m_pressPoint;
if (point.manhattanLength() > DRAG_THRESHOLD)