on xenial help sign in
fix focusing next item in the chain
commitee98fbfaa717a96c7978efdae2b0f024da218532 authorLukáš Tinkl <lukas.tinkl@canonical.com> dateWed 1 Jun 2016, 22:05 (10 years ago) parente627874
3 files changed+6−3
qml/Stages/PhoneStage.qml+2−1 qml/Stages/TabletStage.qml+2−1 tests/qmltests/tst_Shell.qml+2−1
qml/Stages/PhoneStage.qml+2−1
@@ -109,8 +109,9 @@ AbstractStage {
109109 }
110110
111111 function closeFocusedDelegate() {
112− if (priv.focusedAppDelegate && !priv.focusedAppDelegate.isDash) {
112+ if (priv.focusedAppDelegate && priv.focusedAppDelegate.closeable) {
113113 priv.focusedAppDelegate.closed();
114+ spreadRepeater.itemAt(1).focus = true; // focus the next one
114115 }
115116 }
116117
qml/Stages/TabletStage.qml+2−1
@@ -85,8 +85,9 @@ AbstractStage {
8585 }
8686
8787 function closeFocusedDelegate() {
88− if (priv.focusedAppDelegate && !priv.focusedAppDelegate.isDash) {
88+ if (priv.focusedAppDelegate && priv.focusedAppDelegate.closeable) {
8989 priv.focusedAppDelegate.closed();
90+ spreadRepeater.itemAt(1).focus = true; // focus the next one
9091 }
9192 }
9293
tests/qmltests/tst_Shell.qml+2−1
@@ -2459,7 +2459,7 @@ Rectangle {
24592459 return [
24602460 { tag: "phone" },
24612461 { tag: "tablet" },
2462− { tag: "desktop" },
2462+ { tag: "desktop" }
24632463 ]
24642464 }
24652465
@@ -2482,6 +2482,7 @@ Rectangle {
24822482 keyClick(Qt.Key_F4, Qt.AltModifier);
24832483
24842484 tryCompare(topLevelSurfaceList, "count", countBeforeClose - 1);
2485+ tryCompare(ApplicationManager, "focusedApplicationId", "calendar-app");
24852486 }
24862487 }
24872488}