@@ -771,6 +771,34 @@ Item {
771771 tryCompareFunction(function(){return posBefore == posAfter;}, data.button !== Qt.LeftButton ? true : false);
772772 }
773773
774+ function test_spreadDisablesWindowDrag() {
775+ var appDelegate = startApplication("dialer-app");
776+ verify(appDelegate);
777+ var decoration = findChild(appDelegate, "appWindowDecoration");
778+ verify(decoration);
779+
780+ // grab the decoration
781+ var posBefore = Qt.point(appDelegate.x, appDelegate.y);
782+ mousePress(decoration);
783+
784+ // enter the spread
785+ keyPress(Qt.Key_W, Qt.MetaModifier)
786+ tryCompare(stage, "state", "spread");
787+
788+ // try to drag the window
789+ mouseMove(decoration, 10, 10);
790+
791+ // verify it hasn't moved
792+ var posAfter = Qt.point(appDelegate.x, appDelegate.y);
793+ tryCompareFunction(function(){return posBefore == posAfter;}, true);
794+
795+ // cleanup
796+ mouseRelease(decoration);
797+ keyRelease(Qt.Key_W, Qt.MetaModifier);
798+ stage.closeSpread();
799+ tryCompare(stage, "state", "windowed");
800+ }
801+
774802 // regression test for https://bugs.launchpad.net/ubuntu/+source/unity8/+bug/1627281
775803 function test_doubleTapToMaximizeWindow() {
776804 var dialerAppDelegate = startApplication("dialer-app");