on xenial help sign in
fix window control buttons not reachable with the 3-finger overlay
commitf7d59dd54b755db27055437b40fbc5e1ff8023ef authorLukáš Tinkl <lukas.tinkl@canonical.com> dateThu 8 Dec 2016, 15:31 (10 years ago) parent1abb90e
2 files changed+17−1
qml/Stage/WindowControlsOverlay.qml+1−1 tests/qmltests/Stage/tst_DesktopStage.qml+16
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+16
@@ -689,6 +689,22 @@ Item {
689689 tryCompare(overlay, "visible", false);
690690 }
691691 }
692+
693+ function test_windowControlsOverlayMaximizeButtonReachable() {
694+ var facebookAppDelegate = startApplication("facebook-webapp");
695+ verify(facebookAppDelegate);
696+ var overlay = findChild(facebookAppDelegate, "windowControlsOverlay");
697+ verify(overlay);
698+
699+ multiTouchTap([0, 1, 2], facebookAppDelegate);
700+ tryCompare(overlay, "visible", true);
701+
702+ var maxButton = findChild(facebookAppDelegate, "maximizeWindowButton");
703+ tryCompare(maxButton, "visible", true);
704+ mouseClick(maxButton);
705+ tryCompare(facebookAppDelegate, "maximized", true);
706+ }
707+
692708 function test_dashHasNoCloseButton() {
693709 var dashAppDelegate = startApplication("unity8-dash");
694710 verify(dashAppDelegate);