on xenial help sign in
allow left edge gesture to minimize apps even when launcher is already visible.

Approved by PS Jenkins bot, Daniel d'Andrada.

commit0df711c98b65c6faebfc37a294f3760414111653 authorMichael Zanetti <michael.zanetti@canonical.com> dateThu 12 Sep 2013, 19:08 (13 years ago) parentbd368ff331dca1
2 files changed+27−3
Launcher/Launcher.qml+2−2 tests/qmltests/tst_Shell.qml+25−1
Launcher/Launcher.qml+2−2
@@ -192,12 +192,12 @@ Item {
192192
193193 direction: Direction.Rightwards
194194
195− enabled: root.available && root.state !== "visible"
195+ enabled: root.available
196196 width: root.dragAreaWidth
197197 height: root.height
198198
199199 onTouchXChanged: {
200− if (status !== DirectionalDragArea.Recognized)
200+ if (status !== DirectionalDragArea.Recognized || launcher.state == "visible")
201201 return;
202202
203203 // When the gesture finally gets recognized, the finger will likely be
tests/qmltests/tst_Shell.qml+25−1
@@ -114,6 +114,26 @@ Item {
114114 checkRightEdgeDragWithNoRunningApps();
115115 }
116116
117+ function test_leftEdgeDrag_data() {
118+ return [
119+ {tag: "without launcher", revealLauncher: false},
120+ {tag: "with launcher", revealLauncher: true},
121+ ];
122+ }
123+
124+ function test_leftEdgeDrag(data) {
125+ dragLauncherIntoView();
126+ tapOnAppIconInLauncher();
127+ waitUntilApplicationWindowIsFullyVisible();
128+
129+ if (data.revealLauncher) {
130+ dragLauncherIntoView();
131+ }
132+
133+ swipeFromLeftEdge();
134+ waitUntilApplicationWindowIsFullyHidden();
135+ }
136+
117137 function test_suspend() {
118138 var greeter = findChild(shell, "greeter");
119139
@@ -223,7 +243,11 @@ Item {
223243 function dragLauncherIntoView() {
224244 var launcherPanel = findChild(shell, "launcherPanel");
225245 verify(launcherPanel.x = - launcherPanel.width);
226− swipeFromLeftEdge();
246+
247+ var touchStartX = 2;
248+ var touchStartY = shell.height / 2;
249+ touchFlick(shell, touchStartX, touchStartY, launcherPanel.width + units.gu(1), touchStartY);
250+
227251 tryCompare(launcherPanel, "x", 0);
228252 }
229253