on xenial help sign in
cancel the preview on unpush
commitf940ff84ee996d43b7eec7fdab5fc8940afc7016 authorLukáš Tinkl <lukas.tinkl@canonical.com> dateThu 25 Aug 2016, 21:59 (10 years ago) parent2f711c8
2 files changed+3−5
plugins/Cursor/MousePointer.cpp+1−1 qml/Shell.qml+2−4
plugins/Cursor/MousePointer.cpp+1−1
@@ -73,7 +73,7 @@ void MousePointer::handleMouseEvent(ulong timestamp, QPointF movement, Qt::Mouse
7373 Q_EMIT pushedRightBoundary(newX - (sceneWidth - 1), buttons);
7474 } else if (newY < m_panelHeight) { // top edge
7575 Q_EMIT pushedTopBoundary(qAbs(newY - m_panelHeight), buttons);
76− } else if (Q_LIKELY(newX >= 0 && newX < sceneWidth && newY >= 0 && newY < sceneHeight)) { // normal pos, not pushing
76+ } else if (Q_LIKELY(newX > 0 && newX < sceneWidth-1 && newY > 0 && newY < sceneHeight-1)) { // normal pos, not pushing
7777 Q_EMIT pushStopped();
7878 }
7979
qml/Shell.qml+2−4
@@ -826,10 +826,8 @@ StyledItem {
826826 }
827827 onPushStopped: {
828828 if (previewRectangle) {
829− if (previewRectangle.progress > 0 && previewRectangle.progress < previewRectangle.hintThreshold) {
830− print("!!! Cancelling preview", previewRectangle.progress)
831− previewRectangle.stop();
832− }
829+ print("!!! Cancelling preview", previewRectangle.progress)
830+ previewRectangle.stop();
833831 }
834832 }
835833