on xenial help sign in
make surfaces focusscopes
commitb0c3924139765c07fd0b6aef6b6d201bf097f410 authorMichael Zanetti <michael.zanetti@canonical.com> dateTue 8 Jul 2014, 17:48 (12 years ago) parent0f7b1fb
2 files changed+8−1
qml/Stages/PhoneStage.qml+2 qml/Stages/SpreadDelegate.qml+6−1
qml/Stages/PhoneStage.qml+2
@@ -58,6 +58,8 @@ Item {
5858 if (ApplicationManager.focusedApplicationId.length > 0) {
5959 var application = priv.focusedApplication;
6060 root.fullscreen = application.fullscreen;
61+ var appIndex = priv.indexOf(application.appId);
62+ spreadRepeater.itemAt(appIndex).forceActiveFocus();
6163 }
6264 }
6365
qml/Stages/SpreadDelegate.qml+6−1
@@ -35,7 +35,12 @@ Item {
3535 signal clicked()
3636 signal closed()
3737
38− Item {
38+ onActiveFocusChanged: {
39+ if (activeFocus)
40+ surfaceContainer.forceActiveFocus();
41+ }
42+
43+ FocusScope {
3944 id: surfaceContainer
4045 anchors.fill: parent
4146 readonly property var surface: model.surface