on xenial help sign in
Adjust home key to still focus the dash instead of messing with the drawer

Approved by: Lukáš Tinkl

commit44c810cf22d79de127e490127a0757aa0cbd8e72 authorMichael Zanetti <michael.zanetti@canonical.com> dateTue 24 Jan 2017, 07:42 (10 years ago) parent13a79d1c67bb6a
2 files changed+12−1
qml/Shell.qml+1−1 tests/qmltests/tst_Shell.qml+11
qml/Shell.qml+1−1
@@ -241,7 +241,7 @@ StyledItem {
241241 // Ignore when greeter is active, to avoid pocket presses
242242 if (!greeter.active) {
243243 launcher.fadeOut();
244− shell.showHome();
244+ ApplicationManager.requestFocusApplication("unity8-dash");
245245 }
246246 }
247247 onTouchBegun: { cursor.opacity = 0; }
tests/qmltests/tst_Shell.qml+11
@@ -1372,6 +1372,17 @@ Rectangle {
13721372 verify(coverPage.shown);
13731373 }
13741374
1375+ function test_physicalHomeKeyPressFocusesDash() {
1376+ loadShell("phone");
1377+
1378+ var galleryApp = ApplicationManager.startApplication("gallery-app");
1379+ tryCompare(ApplicationManager, "focusedApplicationId", "gallery-app");
1380+
1381+ var windowInputMonitor = findInvisibleChild(shell, "windowInputMonitor");
1382+ windowInputMonitor.homeKeyActivated();
1383+ tryCompare(ApplicationManager, "focusedApplicationId", "unity8-dash");
1384+ }
1385+
13751386 function test_tabletLogin_data() {
13761387 return [
13771388 {tag: "auth error", user: "auth-error", loggedIn: false, password: ""},