mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-01 07:05:48 +00:00
Merge "fix popup menu at efficient mode"
This commit is contained in:
commit
146219b2a2
@ -74,7 +74,9 @@ void TrayWidget::paintEvent(QPaintEvent *e)
|
||||
|
||||
void TrayWidget::mousePressEvent(QMouseEvent *e)
|
||||
{
|
||||
QWidget::mousePressEvent(e);
|
||||
const QPoint point(e->pos() - rect().center());
|
||||
if (point.manhattanLength() > 24)
|
||||
return QWidget::mousePressEvent(e);
|
||||
|
||||
m_pressPoint = e->pos();
|
||||
}
|
||||
@ -83,6 +85,10 @@ void TrayWidget::mouseReleaseEvent(QMouseEvent *e)
|
||||
{
|
||||
QWidget::mouseReleaseEvent(e);
|
||||
|
||||
const QPoint point(e->pos() - rect().center());
|
||||
if (point.manhattanLength() > 24)
|
||||
return;
|
||||
|
||||
const QPoint distance = e->pos() - m_pressPoint;
|
||||
if (distance.manhattanLength() > DRAG_THRESHOLD)
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user