on xenial help sign in
Fix touch window controls being unreachable when the overlay is being displayed (LP: #1648167)

Approved by: Josh Arenson, Unity8 CI Bot

commit521240dc7a8a72d5db803f3753cd604f58c1e0fd authorLukáš Tinkl <lukas.tinkl@canonical.com> dateTue 10 Jan 2017, 14:44 (10 years ago) parent876c4a732d8ead
2 files changed+18−1
qml/Stage/WindowControlsOverlay.qml+1−1 tests/qmltests/Stage/tst_DesktopStage.qml+17
qml/Stage/WindowControlsOverlay.qml+1−1
@@ -184,7 +184,7 @@ Item {
184184 }
185185
186186 overlayTimer.stop();
187− mouse.accepted = root.contains(mapToItem(root.target, mouse.x, mouse.y));
187+ mouse.accepted = root.contains(mapToItem(root.target.clientAreaItem, mouse.x, mouse.y));
188188 }
189189 propagateComposedEvents: true
190190 }
tests/qmltests/Stage/tst_DesktopStage.qml+17
@@ -656,6 +656,23 @@ Item {
656656 tryCompare(overlay, "visible", false);
657657 }
658658 }
659+
660+ function test_windowControlsOverlayMaximizeButtonReachable() {
661+ var facebookAppDelegate = startApplication("facebook-webapp");
662+ verify(facebookAppDelegate);
663+ var overlay = findChild(facebookAppDelegate, "windowControlsOverlay");
664+ verify(overlay);
665+
666+ multiTouchTap([0, 1, 2], facebookAppDelegate);
667+ tryCompare(overlay, "visible", true);
668+
669+ var maxButton = findChild(facebookAppDelegate, "maximizeWindowButton");
670+ tryCompare(maxButton, "visible", true);
671+ wait(700); // there's a lot of behaviors on different decoration elements, make sure they're all settled
672+ mouseClick(maxButton);
673+ tryCompare(facebookAppDelegate, "maximized", true);
674+ }
675+
659676 function test_dashHasNoCloseButton() {
660677 var dashAppDelegate = startApplication("unity8-dash");
661678 verify(dashAppDelegate);