on xenial help sign in
make surfaces focusscopes
b0c3924Michael Zanetti
qml/Stages/PhoneStage.qml+2
@@ -58,6 +58,8 @@ Item {
58 if (ApplicationManager.focusedApplicationId.length > 0) {
58 if (ApplicationManager.focusedApplicationId.length > 0) {
59 var application = priv.focusedApplication;
59 var application = priv.focusedApplication;
60 root.fullscreen = application.fullscreen;
60 root.fullscreen = application.fullscreen;
61+ var appIndex = priv.indexOf(application.appId);
62+ spreadRepeater.itemAt(appIndex).forceActiveFocus();
61 }
63 }
62 }
64 }
63
65
qml/Stages/SpreadDelegate.qml+6−1
@@ -35,7 +35,12 @@ Item {
35 signal clicked()
35 signal clicked()
36 signal closed()
36 signal closed()
37
37
38− Item {
38+ onActiveFocusChanged: {
39+ if (activeFocus)
40+ surfaceContainer.forceActiveFocus();
41+ }
42+
43+ FocusScope {
39 id: surfaceContainer
44 id: surfaceContainer
40 anchors.fill: parent
45 anchors.fill: parent
41 readonly property var surface: model.surface
46 readonly property var surface: model.surface