on xenial help sign in
Adjust home key to still focus the dash instead of messing with the drawer
44c810cMichael Zanetti
qml/Shell.qml+1−1
@@ -241,7 +241,7 @@ StyledItem {
241 // Ignore when greeter is active, to avoid pocket presses
241 // Ignore when greeter is active, to avoid pocket presses
242 if (!greeter.active) {
242 if (!greeter.active) {
243 launcher.fadeOut();
243 launcher.fadeOut();
244− shell.showHome();
244+ ApplicationManager.requestFocusApplication("unity8-dash");
245 }
245 }
246 }
246 }
247 onTouchBegun: { cursor.opacity = 0; }
247 onTouchBegun: { cursor.opacity = 0; }
tests/qmltests/tst_Shell.qml+11
@@ -1372,6 +1372,17 @@ Rectangle {
1372 verify(coverPage.shown);
1372 verify(coverPage.shown);
1373 }
1373 }
1374
1374
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+
1375 function test_tabletLogin_data() {
1386 function test_tabletLogin_data() {
1376 return [
1387 return [
1377 {tag: "auth error", user: "auth-error", loggedIn: false, password: ""},
1388 {tag: "auth error", user: "auth-error", loggedIn: false, password: ""},