@@ -58,23 +58,33 @@ void MousePointer::handleMouseEvent(ulong timestamp, QPointF movement, Qt::Mouse
5858 if (newX <= 0 && newY < m_topBoundaryOffset) { // top left corner
5959 const auto distance = qSqrt(qPow(newX, 2) + qPow(newY-m_topBoundaryOffset, 2));
6060 Q_EMIT pushedTopLeftCorner(qAbs(distance), buttons);
61+ m_pushing = true;
6162 } else if (newX >= sceneWidth-1 && newY < m_topBoundaryOffset) { // top right corner
6263 const auto distance = qSqrt(qPow(newX-sceneWidth, 2) + qPow(newY-m_topBoundaryOffset, 2));
6364 Q_EMIT pushedTopRightCorner(qAbs(distance), buttons);
65+ m_pushing = true;
6466 } else if (newX < 0 && newY >= sceneHeight-1) { // bottom left corner
6567 const auto distance = qSqrt(qPow(newX, 2) + qPow(newY-sceneHeight, 2));
6668 Q_EMIT pushedBottomLeftCorner(qAbs(distance), buttons);
69+ m_pushing = true;
6770 } else if (newX >= sceneWidth-1 && newY >= sceneHeight-1) { // bottom right corner
6871 const auto distance = qSqrt(qPow(newX-sceneWidth, 2) + qPow(newY-sceneHeight, 2));
6972 Q_EMIT pushedBottomRightCorner(qAbs(distance), buttons);
73+ m_pushing = true;
7074 } else if (newX < 0) { // left edge
7175 Q_EMIT pushedLeftBoundary(qAbs(newX), buttons);
76+ m_pushing = true;
7277 } else if (newX >= sceneWidth) { // right edge
7378 Q_EMIT pushedRightBoundary(newX - (sceneWidth - 1), buttons);
79+ m_pushing = true;
7480 } else if (newY < m_topBoundaryOffset) { // top edge
7581 Q_EMIT pushedTopBoundary(qAbs(newY - m_topBoundaryOffset), buttons);
82+ m_pushing = true;
7683 } else if (Q_LIKELY(newX > 0 && newX < sceneWidth-1 && newY > 0 && newY < sceneHeight-1)) { // normal pos, not pushing
77− Q_EMIT pushStopped();
84+ if (m_pushing) {
85+ Q_EMIT pushStopped();
86+ m_pushing = false;
87+ }
7888 }
7989
8090 setX(qBound(0.0, newX, sceneWidth - 1));