summaryrefslogtreecommitdiff
path: root/src/login/logind-session.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-05-19 09:03:20 +0900
committerLennart Poettering <lennart@poettering.net>2014-05-19 09:03:20 +0900
commit952d32609f9bceee444fa2690afb4d28539b4b92 (patch)
treed952a24f01c7f0727e68b29b26a6fdb74d86b8cc /src/login/logind-session.c
parent2be6107255c3cf47bb5a9eddf2411953f29522e1 (diff)
logind: fix Display property of user objects
When we dropped support for creating a per-user to the "main" X11 display we stopped returning useful data in the "Display" user property. With this change this is fixed and we again expose an appropriate (graphical session) in the property that is useful as the "main" one, if one is needed.
Diffstat (limited to 'src/login/logind-session.c')
-rw-r--r--src/login/logind-session.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/login/logind-session.c b/src/login/logind-session.c
index 4fb229e354..9a54101301 100644
--- a/src/login/logind-session.c
+++ b/src/login/logind-session.c
@@ -545,6 +545,8 @@ int session_start(Session *s) {
s->started = true;
+ user_elect_display(s->user);
+
/* Save data */
session_save(s);
user_save(s->user);
@@ -553,7 +555,7 @@ int session_start(Session *s) {
/* Send signals */
session_send_signal(s, true);
- user_send_changed(s->user, "Sessions", NULL);
+ user_send_changed(s->user, "Sessions", "Display", NULL);
if (s->seat) {
if (s->seat->active == s)
seat_send_changed(s->seat, "Sessions", "ActiveSession", NULL);
@@ -612,6 +614,8 @@ int session_stop(Session *s, bool force) {
s->stopping = true;
+ user_elect_display(s->user);
+
session_save(s);
user_save(s->user);
@@ -660,7 +664,7 @@ int session_finalize(Session *s) {
}
user_save(s->user);
- user_send_changed(s->user, "Sessions", NULL);
+ user_send_changed(s->user, "Sessions", "Display", NULL);
return r;
}