on xenial help sign in
take a different more reliable approach at detecting whether the window is moving
b316dd1Lukáš Tinkl
tests/qmltests/Stage/tst_DesktopStage.qml+2−4
@@ -778,7 +778,6 @@ Item {
778 verify(decoration);
778 verify(decoration);
779
779
780 // grab the decoration
780 // grab the decoration
781− var posBefore = Qt.point(appDelegate.x, appDelegate.y);
782 mousePress(decoration);
781 mousePress(decoration);
783
782
784 // enter the spread
783 // enter the spread
@@ -788,9 +787,8 @@ Item {
788 // try to drag the window
787 // try to drag the window
789 mouseMove(decoration, 10, 10, 200);
788 mouseMove(decoration, 10, 10, 200);
790
789
791− // verify it hasn't moved
790+ // verify it's not moving even before we release the decoration drag
792− var posAfter = Qt.point(appDelegate.x, appDelegate.y);
791+ tryCompare(appDelegate, "dragging", false);
793− tryCompareFunction(function(){return posBefore == posAfter;}, true);
794
792
795 // cleanup
793 // cleanup
796 mouseRelease(decoration);
794 mouseRelease(decoration);