on xenial help sign in
Fix touch window controls being unreachable when the overlay is being displayed (LP: #1648167)
521240dLukáš Tinkl
qml/Stage/WindowControlsOverlay.qml+1−1
@@ -184,7 +184,7 @@ Item {
184 }
184 }
185
185
186 overlayTimer.stop();
186 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));
188 }
188 }
189 propagateComposedEvents: true
189 propagateComposedEvents: true
190 }
190 }
tests/qmltests/Stage/tst_DesktopStage.qml+17
@@ -656,6 +656,23 @@ Item {
656 tryCompare(overlay, "visible", false);
656 tryCompare(overlay, "visible", false);
657 }
657 }
658 }
658 }
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+
659 function test_dashHasNoCloseButton() {
676 function test_dashHasNoCloseButton() {
660 var dashAppDelegate = startApplication("unity8-dash");
677 var dashAppDelegate = startApplication("unity8-dash");
661 verify(dashAppDelegate);
678 verify(dashAppDelegate);