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.

Approved by Andrea Cimitan, PS Jenkins bot, Michael Zanetti.

commit56e5cc72d5de11ffe0c47ab81dc41a7c1a3976f5 authorAndrea Cimitan <andrea.cimitan@gmail.com> dateThu 7 Nov 2013, 22:59 (13 years ago) parent312df591bff468
3 files changed+9−2
Launcher/Launcher.qml+1−1 Shell.qml+4−1 tests/qmltests/tst_Shell.qml+4
Launcher/Launcher.qml+1−1
@@ -29,7 +29,7 @@ Item {
2929 property int panelWidth: units.gu(8)
3030 property int dragAreaWidth: units.gu(1)
3131 property int minimizeDistance: units.gu(26)
32− property real progress: dragArea.dragging && dragArea.touchX > panelWidth ?
32+ property real progress: dragArea.dragging && dragArea.touchX > panelWidth ?
3333 (width * (dragArea.touchX-panelWidth) / (width - panelWidth)) : 0
3434
3535 readonly property bool shown: panel.x > -panel.width
Shell.qml+4−1
@@ -647,19 +647,22 @@ FocusScope {
647647 Launcher {
648648 id: launcher
649649
650+ readonly property bool dashSwipe: progress > 0
651+
650652 anchors.top: parent.top
651653 anchors.bottom: parent.bottom
652654 width: parent.width
653655 dragAreaWidth: shell.edgeSize
654656 available: (!greeter.shown || greeter.narrowMode) && edgeDemo.launcherEnabled
657+
655658 onDashItemSelected: showHome()
656659 onDash: {
657660 if (stages.shown) {
658− dash.setCurrentScope("applications.scope", true /* animate */, true /* reset */)
659661 stages.hide();
660662 launcher.hide();
661663 }
662664 }
665+ onDashSwipeChanged: if (dashSwipe && stages.shown) dash.setCurrentScope("applications.scope", false, true)
663666 onLauncherApplicationSelected:{
664667 greeter.hide()
665668 shell.activateApplication(appId)
tests/qmltests/tst_Shell.qml+4
@@ -297,6 +297,10 @@ Item {
297297
298298 waitUntilApplicationWindowIsFullyVisible();
299299
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+
300304 // Minimize the application we just launched
301305 swipeFromLeftEdge(units.gu(27));
302306