@@ -91,10 +91,8 @@ Item {
93 MouseArea {
93 MouseArea {
94− id: fakeMouseArea
94+ id: clickThroughTester
95 anchors.fill: desktopStageLoader.item
95 anchors.fill: desktopStageLoader.item
96− enabled: desktopStageLoader.status === Loader.Ready && testCase.running
98 acceptedButtons: Qt.AllButtons
96 acceptedButtons: Qt.AllButtons
99 hoverEnabled: true
97 hoverEnabled: true
@@ -151,7 +149,7 @@ Item {
152 SignalSpy {
150 SignalSpy {
153 id: mouseEaterSpy
151 id: mouseEaterSpy
154− target: fakeMouseArea
152+ target: clickThroughTester
157 UnityTestCase {
155 UnityTestCase {
@@ -672,10 +670,11 @@ Item {
673 function test_eatWindowDecorationMouseEvents_data() {
671 function test_eatWindowDecorationMouseEvents_data() {
675− {tag: "left mouse press", signalName: "pressed", button: Qt.LeftButton },
673+ {tag: "left mouse click", signalName: "clicked", button: Qt.LeftButton },
676− {tag: "right mouse press", signalName: "pressed", button: Qt.RightButton },
674+ {tag: "right mouse click", signalName: "clicked", button: Qt.RightButton },
677− {tag: "middle mouse press", signalName: "pressed", button: Qt.MiddleButton },
675+ {tag: "middle mouse click", signalName: "clicked", button: Qt.MiddleButton },
678− {tag: "mouse wheel", signalName: "wheel", button: Qt.MiddleButton }
676+ {tag: "mouse wheel", signalName: "wheel", button: Qt.MiddleButton },
677+ {tag: "double click (RMB)", signalName: "doubleClicked", button: Qt.RightButton },
@@ -685,15 +684,17 @@ Item {
685 var decoration = findChild(dialerAppDelegate, "appWindowDecoration");
684 var decoration = findChild(dialerAppDelegate, "appWindowDecoration");
686 verify(decoration);
685 verify(decoration);
688− fakeMouseArea.enabled = true;
689 mouseEaterSpy.signalName = data.signalName;
687 mouseEaterSpy.signalName = data.signalName;
690 if (data.signalName === "wheel") {
688 if (data.signalName === "wheel") {
691 mouseWheel(decoration, decoration.width/2, decoration.height/2, 20, 20);
689 mouseWheel(decoration, decoration.width/2, decoration.height/2, 20, 20);
692− } else {
690+ } else if (data.signalName === "clicked") {
693 mouseClick(decoration, decoration.width/2, decoration.height/2, data.button);
691 mouseClick(decoration, decoration.width/2, decoration.height/2, data.button);
693+ mouseDoubleClick(decoration, decoration.width/2, decoration.height/2, data.button);
694+ tryCompare(dialerAppDelegate, "maximized", false);
695 tryCompare(mouseEaterSpy, "count", 0);
697 tryCompare(mouseEaterSpy, "count", 0);
696− fakeMouseArea.enabled = false;