diff --git a/plugins/system-tray/traywidget.cpp b/plugins/system-tray/traywidget.cpp index 2cca4093b..18e9cb694 100644 --- a/plugins/system-tray/traywidget.cpp +++ b/plugins/system-tray/traywidget.cpp @@ -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;