on xenial help sign in
Update current session after changing the user

This matches unity7 greeter behaviour, i.e. if you change the session and then change the user, the session that shows up is the last session that new user logged in and not the new session you selected in the previous user

commitb5651a8194062d0b3c83351ef09edf04830484a2 authorAlbert Astals Cid <albert.astals@canonical.com> dateMon 19 Dec 2016, 16:48 (10 years ago) parent2ded5bd
1 file changed+1−4
qml/Greeter/WideView.qml+1−4
qml/Greeter/WideView.qml+1−4
@@ -125,8 +125,6 @@ FocusScope {
125125 id: loginList
126126 objectName: "loginList"
127127
128− property int selectedUserIndex: 0
129−
130128 width: units.gu(40)
131129 anchors {
132130 left: parent.left
@@ -141,11 +139,10 @@ FocusScope {
141139 Behavior on boxVerticalOffset { UbuntuNumberAnimation {} }
142140
143141 model: root.userModel
144− currentSession: LightDMService.users.data(selectedUserIndex, LightDMService.userRoles.SessionRole);
145142 onResponded: root.responded(response)
146143 onSelected: {
147144 root.selected(index)
148− loginList.selectedUserIndex = index;
145+ currentSession = LightDMService.users.data(index, LightDMService.userRoles.SessionRole);
149146 }
150147 onSessionChooserButtonClicked: parent.state = "SessionsList"
151148