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