on xenial help sign in
Don't hide launcher when nothing happens on long left edge swipes Fixes: 1357333
318e81aMichael Zanetti
qml/Launcher/Launcher.qml+1−2
@@ -243,10 +243,9 @@ Item {
243 onDraggingChanged: {
243 onDraggingChanged: {
244 if (!dragging) {
244 if (!dragging) {
245 if (distance > panel.width / 2) {
245 if (distance > panel.width / 2) {
246+ root.switchToNextState("visible")
246 if (distance > minimizeDistance) {
247 if (distance > minimizeDistance) {
247 root.dash();
248 root.dash();
248− } else {
249− root.switchToNextState("visible")
250 }
249 }
251 } else {
250 } else {
252 root.switchToNextState("")
251 root.switchToNextState("")
qml/Shell.qml+5−1
@@ -564,7 +564,11 @@ Item {
564 available: edgeDemo.launcherEnabled && (!shell.locked || AccountsService.enableLauncherWhileLocked) && greeter.fakeActiveForApp === ""
564 available: edgeDemo.launcherEnabled && (!shell.locked || AccountsService.enableLauncherWhileLocked) && greeter.fakeActiveForApp === ""
565
565
566 onShowDashHome: showHome()
566 onShowDashHome: showHome()
567+ onDash: {
568+ if (ApplicationManager.focusedApplicationId != "unity8-dash") {
567− onDash: showDash()
569+ showDash()
570+ }
571+ }
568 onDashSwipeChanged: {
572 onDashSwipeChanged: {
569 if (dashSwipe) {
573 if (dashSwipe) {
570 dash.setCurrentScope("clickscope", false, true)
574 dash.setCurrentScope("clickscope", false, true)
tests/qmltests/tst_Shell.qml+13−6
@@ -170,10 +170,11 @@ Row {
170
170
171 function test_leftEdgeDrag_data() {
171 function test_leftEdgeDrag_data() {
172 return [
172 return [
173− {tag: "without launcher", revealLauncher: false, swipeLength: units.gu(27), appHides: true},
173+ {tag: "without launcher", revealLauncher: false, swipeLength: units.gu(27), appHides: true, focusedApp: "dialer-app", launcherHides: true},
174− {tag: "with launcher", revealLauncher: true, swipeLength: units.gu(27), appHides: true},
174+ {tag: "with launcher", revealLauncher: true, swipeLength: units.gu(27), appHides: true, focusedApp: "dialer-app", launcherHides: true},
175− {tag: "small swipe", revealLauncher: false, swipeLength: units.gu(25), appHides: false},
175+ {tag: "small swipe", revealLauncher: false, swipeLength: units.gu(25), appHides: false, focusedApp: "dialer-app", launcherHides: false},
176+ {tag: "long swipe", revealLauncher: false, swipeLength: units.gu(27), appHides: true, focusedApp: "dialer-app", launcherHides: true},
176− {tag: "long swipe", revealLauncher: false, swipeLength: units.gu(27), appHides: true}
177+ {tag: "long swipe", revealLauncher: false, swipeLength: units.gu(27), appHides: true, focusedApp: "unity8-dash", launcherHides: false}
177 ];
178 ];
178 }
179 }
179
180
@@ -181,16 +182,22 @@ Row {
181 dragLauncherIntoView();
182 dragLauncherIntoView();
182 tapOnAppIconInLauncher();
183 tapOnAppIconInLauncher();
183 waitUntilApplicationWindowIsFullyVisible();
184 waitUntilApplicationWindowIsFullyVisible();
185+ ApplicationManager.focusApplication(data.focusedApp)
186+ waitUntilApplicationWindowIsFullyVisible();
184
187
185 if (data.revealLauncher) {
188 if (data.revealLauncher) {
186 dragLauncherIntoView();
189 dragLauncherIntoView();
187 }
190 }
188
191
189 swipeFromLeftEdge(data.swipeLength);
192 swipeFromLeftEdge(data.swipeLength);
190− if (data.appHides)
193+ if (data.appHides) {
191 waitUntilDashIsFocused();
194 waitUntilDashIsFocused();
192− else
195+ } else {
193 waitUntilApplicationWindowIsFullyVisible();
196 waitUntilApplicationWindowIsFullyVisible();
197+ }
198+
199+ var launcher = findChild(shell, "launcherPanel");
200+ tryCompare(launcher, "x", data.launcherHides ? -launcher.width : 0)
194 }
201 }
195
202
196 function test_suspend() {
203 function test_suspend() {