Merge lp:~mterry/lightdm/activate-after-unlocking into lp:lightdm

Proposed by Michael Terry
Status: Merged
Merged at revision: 1932
Proposed branch: lp:~mterry/lightdm/activate-after-unlocking
Merge into: lp:lightdm
Diff against target: 32 lines (+20/-0)
1 file modified
src/login1.c (+20/-0)
To merge this branch: bzr merge lp:~mterry/lightdm/activate-after-unlocking
Reviewer Review Type Date Requested Status
Robert Ancell Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+211235@code.launchpad.net

Commit message

Call Activate() after Unlock() when unlocking a logind session. This ensures that no matter the display server, the session will be active.

Description of the change

Call Activate() after Unlock() when unlocking a logind session. This ensures that no matter the display server, the session will be active.

X11 does it automatically because logind seems to track VT switches. But for Mir or some other display server, we need to make sure it happens. Since it's good to be explicit even for X11, we just unconditionally do it here.

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
Robert Ancell (robert-ancell) wrote :

Seems to work fine for me.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/login1.c'
2--- src/login1.c 2013-04-23 22:58:23 +0000
3+++ src/login1.c 2014-03-17 02:33:31 +0000
4@@ -136,8 +136,28 @@
5 if (error)
6 g_warning ("Error unlocking login1 session: %s", error->message);
7 g_clear_error (&error);
8+
9 if (result)
10+ {
11 g_variant_unref (result);
12+
13+ result = g_dbus_connection_call_sync (bus,
14+ "org.freedesktop.login1",
15+ session_path,
16+ "org.freedesktop.login1.Session",
17+ "Activate",
18+ g_variant_new ("()"),
19+ G_VARIANT_TYPE ("()"),
20+ G_DBUS_CALL_FLAGS_NONE,
21+ -1,
22+ NULL,
23+ &error);
24+ if (error)
25+ g_warning ("Error activating login1 session: %s", error->message);
26+ g_clear_error (&error);
27+ if (result)
28+ g_variant_unref (result);
29+ }
30 }
31 g_object_unref (bus);
32 }

Subscribers

People subscribed via source and target branches