Merge lp:~robert-ancell/unity-greeter/double-authenticate into lp:unity-greeter

Proposed by Robert Ancell
Status: Merged
Approved by: Robert Ancell
Approved revision: 1157
Merged at revision: 1160
Proposed branch: lp:~robert-ancell/unity-greeter/double-authenticate
Merge into: lp:unity-greeter
Diff against target: 27 lines (+2/-5)
2 files modified
src/greeter-list.vala (+1/-0)
src/user-list.vala (+1/-5)
To merge this branch: bzr merge lp:~robert-ancell/unity-greeter/double-authenticate
Reviewer Review Type Date Requested Status
Michael Terry (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Unity Greeter Development Team Pending
Review via email: mp+210529@code.launchpad.net

Commit message

Fix the greeter authenticating twice when it starts.

This was due to it authenticating when the user list is created and then again when it is realized.
This is due to faulty code that needs to start the animation once the widget is realized.
I've hacked this by waiting for the realize for the first authenticate (since the realize must always occur in this case).
The existing code was buggy anyway because it would not even pick up user changes if the initial list was empty.

Description of the change

This bug was discovered by hitting a race condition in LightDM where the two sessions started in quick succession would cause the terminate of the first session to get misinterpreted and stopping the daemon.

While we now correctly handle this in the daemon we should fix the greeter to only authenticate once as there could potentially be other side-effects.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michael Terry (mterry) wrote :

Looks good to me.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/greeter-list.vala'
2--- src/greeter-list.vala 2014-01-15 20:53:05 +0000
3+++ src/greeter-list.vala 2014-03-12 03:23:15 +0000
4@@ -685,6 +685,7 @@
5 {
6 base.realize ();
7
8+ /* NOTE: This is going to cause the entry_selected signal to be emitted even if selected_entry has not changed */
9 var saved_entry = selected_entry;
10 selected_entry = null;
11 select_entry (saved_entry, 1, start_scrolling);
12
13=== modified file 'src/user-list.vala'
14--- src/user-list.vala 2013-10-21 20:06:10 +0000
15+++ src/user-list.vala 2014-03-12 03:23:15 +0000
16@@ -116,11 +116,7 @@
17
18 fill_list ();
19
20- if (selected_entry != null)
21- {
22- entry_selected.connect (entry_selected_cb);
23- entry_selected_cb (selected_entry.id);
24- }
25+ entry_selected.connect (entry_selected_cb);
26
27 connect_to_lightdm ();
28

Subscribers

People subscribed via source and target branches