on xenial help sign in
Switch to application scope when a dash swipe is taking place and an app is on foreground. Fixes: https://bugs.launchpad.net/bugs/1231996.
56e5cc7Andrea Cimitan
Launcher/Launcher.qml+1−1
@@ -29,7 +29,7 @@ Item {
29 property int panelWidth: units.gu(8)
29 property int panelWidth: units.gu(8)
30 property int dragAreaWidth: units.gu(1)
30 property int dragAreaWidth: units.gu(1)
31 property int minimizeDistance: units.gu(26)
31 property int minimizeDistance: units.gu(26)
32− property real progress: dragArea.dragging && dragArea.touchX > panelWidth ?
32+ property real progress: dragArea.dragging && dragArea.touchX > panelWidth ?
33 (width * (dragArea.touchX-panelWidth) / (width - panelWidth)) : 0
33 (width * (dragArea.touchX-panelWidth) / (width - panelWidth)) : 0
34
34
35 readonly property bool shown: panel.x > -panel.width
35 readonly property bool shown: panel.x > -panel.width
Shell.qml+4−1
@@ -647,19 +647,22 @@ FocusScope {
647 Launcher {
647 Launcher {
648 id: launcher
648 id: launcher
649
649
650+ readonly property bool dashSwipe: progress > 0
651+
650 anchors.top: parent.top
652 anchors.top: parent.top
651 anchors.bottom: parent.bottom
653 anchors.bottom: parent.bottom
652 width: parent.width
654 width: parent.width
653 dragAreaWidth: shell.edgeSize
655 dragAreaWidth: shell.edgeSize
654 available: (!greeter.shown || greeter.narrowMode) && edgeDemo.launcherEnabled
656 available: (!greeter.shown || greeter.narrowMode) && edgeDemo.launcherEnabled
657+
655 onDashItemSelected: showHome()
658 onDashItemSelected: showHome()
656 onDash: {
659 onDash: {
657 if (stages.shown) {
660 if (stages.shown) {
658− dash.setCurrentScope("applications.scope", true /* animate */, true /* reset */)
659 stages.hide();
661 stages.hide();
660 launcher.hide();
662 launcher.hide();
661 }
663 }
662 }
664 }
665+ onDashSwipeChanged: if (dashSwipe && stages.shown) dash.setCurrentScope("applications.scope", false, true)
663 onLauncherApplicationSelected:{
666 onLauncherApplicationSelected:{
664 greeter.hide()
667 greeter.hide()
665 shell.activateApplication(appId)
668 shell.activateApplication(appId)
tests/qmltests/tst_Shell.qml+4
@@ -297,6 +297,10 @@ Item {
297
297
298 waitUntilApplicationWindowIsFullyVisible();
298 waitUntilApplicationWindowIsFullyVisible();
299
299
300+ // Dragging launcher into view with a little bit of gap (units.gu(1)) should switch to Apps scope
301+ dragLauncherIntoView();
302+ verify(itemIsOnScreen(dashApps));
303+
300 // Minimize the application we just launched
304 // Minimize the application we just launched
301 swipeFromLeftEdge(units.gu(27));
305 swipeFromLeftEdge(units.gu(27));
302
306