@@ -771,6 +771,32 @@ 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+ mousePress(decoration);
784+ keyPress(Qt.Key_W, Qt.MetaModifier)
785+ tryCompare(stage, "state", "spread");
787+ // try to drag the window
788+ mouseMove(decoration, 10, 10, 200);
790+ // verify it's not moving even before we release the decoration drag
791+ tryCompare(appDelegate, "dragging", false);
794+ mouseRelease(decoration);
795+ keyRelease(Qt.Key_W, Qt.MetaModifier);
796+ stage.closeSpread();
797+ tryCompare(stage, "state", "windowed");
774 // regression test for https://bugs.launchpad.net/ubuntu/+source/unity8/+bug/1627281
800 // regression test for https://bugs.launchpad.net/ubuntu/+source/unity8/+bug/1627281
775 function test_doubleTapToMaximizeWindow() {
801 function test_doubleTapToMaximizeWindow() {
776 var dialerAppDelegate = startApplication("dialer-app");
802 var dialerAppDelegate = startApplication("dialer-app");