on xenial help sign in
Return the correct role for the user session name
commit10f5f1779f3a20f9c5d98903468c50bcf830d529 authorJosh Arenson <joshua.arenson@canonical.com> dateFri 21 Oct 2016, 15:28 (10 years ago) parenta2b90d9
1 file changed+8−2
qml/Greeter/WideView.qml+8−2
qml/Greeter/WideView.qml+8−2
@@ -125,6 +125,8 @@ FocusScope {
125125 id: loginList
126126 objectName: "loginList"
127127
128+ property int selectedUserIndex: 0
129+
128130 width: units.gu(40)
129131 anchors {
130132 left: parent.left
@@ -139,9 +141,13 @@ FocusScope {
139141 Behavior on boxVerticalOffset { UbuntuNumberAnimation {} }
140142
141143 model: root.userModel
142− currentSession: LightDM.Greeter.defaultSession
144+ currentSession: LightDM.Users.data(selectedUserIndex,
145+ LightDM.UserRoles.SessionRole);
143146 onResponded: root.responded(response)
144− onSelected: root.selected(index)
147+ onSelected: {
148+ root.selected(index)
149+ selectedUserIndex = index;
150+ }
145151 onSessionChooserButtonClicked: parent.state = "SessionsList"
146152
147153 Keys.forwardTo: [sessionChooserLoader.item]