@@ -91,10 +91,8 @@ Item {
9191 }
9292
9393 MouseArea {
94− id: fakeMouseArea
94+ id: clickThroughTester
9595 anchors.fill: desktopStageLoader.item
96− enabled: desktopStageLoader.status === Loader.Ready && testCase.running
97− visible: enabled
9896 acceptedButtons: Qt.AllButtons
9997 hoverEnabled: true
10098 }
@@ -151,7 +149,7 @@ Item {
151149
152150 SignalSpy {
153151 id: mouseEaterSpy
154− target: fakeMouseArea
152+ target: clickThroughTester
155153 }
156154
157155 UnityTestCase {
@@ -672,10 +670,11 @@ Item {
672670
673671 function test_eatWindowDecorationMouseEvents_data() {
674672 return [
675− {tag: "left mouse press", signalName: "pressed", button: Qt.LeftButton },
676− {tag: "right mouse press", signalName: "pressed", button: Qt.RightButton },
677− {tag: "middle mouse press", signalName: "pressed", button: Qt.MiddleButton },
678− {tag: "mouse wheel", signalName: "wheel", button: Qt.MiddleButton }
673+ {tag: "left mouse click", signalName: "clicked", button: Qt.LeftButton },
674+ {tag: "right mouse click", signalName: "clicked", button: Qt.RightButton },
675+ {tag: "middle mouse click", signalName: "clicked", button: Qt.MiddleButton },
676+ {tag: "mouse wheel", signalName: "wheel", button: Qt.MiddleButton },
677+ {tag: "double click (RMB)", signalName: "doubleClicked", button: Qt.RightButton },
679678 ]
680679 }
681680
@@ -685,15 +684,17 @@ Item {
685684 var decoration = findChild(dialerAppDelegate, "appWindowDecoration");
686685 verify(decoration);
687686
688− fakeMouseArea.enabled = true;
689687 mouseEaterSpy.signalName = data.signalName;
690688 if (data.signalName === "wheel") {
691689 mouseWheel(decoration, decoration.width/2, decoration.height/2, 20, 20);
692− } else {
690+ } else if (data.signalName === "clicked") {
693691 mouseClick(decoration, decoration.width/2, decoration.height/2, data.button);
692+ } else {
693+ mouseDoubleClick(decoration, decoration.width/2, decoration.height/2, data.button);
694+ tryCompare(dialerAppDelegate, "maximized", false);
694695 }
696+
695697 tryCompare(mouseEaterSpy, "count", 0);
696− fakeMouseArea.enabled = false;
697698 }
698699 }
699700}