mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-10-28 03:25:27 +03:00
logind: Don't try to emit a change signal for the 'Sessions' property (#5211)
The 'Sessions' property for both org.freedesktop.login1.User and org.freedesktop.login1.Seat is marked as EmitsChangedSignal(false). Trying to emit a change signal that includes the 'Sessions' property leads to the signal not being sent at all. Fixes #5210.
This commit is contained in:
parent
2341216ad7
commit
7d049e304e
@ -541,8 +541,6 @@ int seat_attach_session(Seat *s, Session *session) {
|
|||||||
LIST_PREPEND(sessions_by_seat, s->sessions, session);
|
LIST_PREPEND(sessions_by_seat, s->sessions, session);
|
||||||
seat_assign_position(s, session);
|
seat_assign_position(s, session);
|
||||||
|
|
||||||
seat_send_changed(s, "Sessions", NULL);
|
|
||||||
|
|
||||||
/* On seats with VTs, the VT logic defines which session is active. On
|
/* On seats with VTs, the VT logic defines which session is active. On
|
||||||
* seats without VTs, we automatically activate new sessions. */
|
* seats without VTs, we automatically activate new sessions. */
|
||||||
if (!seat_has_vts(s))
|
if (!seat_has_vts(s))
|
||||||
|
@ -586,12 +586,10 @@ int session_start(Session *s) {
|
|||||||
|
|
||||||
/* Send signals */
|
/* Send signals */
|
||||||
session_send_signal(s, true);
|
session_send_signal(s, true);
|
||||||
user_send_changed(s->user, "Sessions", "Display", NULL);
|
user_send_changed(s->user, "Display", NULL);
|
||||||
if (s->seat) {
|
if (s->seat) {
|
||||||
if (s->seat->active == s)
|
if (s->seat->active == s)
|
||||||
seat_send_changed(s->seat, "Sessions", "ActiveSession", NULL);
|
seat_send_changed(s->seat, "ActiveSession", NULL);
|
||||||
else
|
|
||||||
seat_send_changed(s->seat, "Sessions", NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -698,11 +696,10 @@ int session_finalize(Session *s) {
|
|||||||
seat_set_active(s->seat, NULL);
|
seat_set_active(s->seat, NULL);
|
||||||
|
|
||||||
seat_save(s->seat);
|
seat_save(s->seat);
|
||||||
seat_send_changed(s->seat, "Sessions", NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
user_save(s->user);
|
user_save(s->user);
|
||||||
user_send_changed(s->user, "Sessions", "Display", NULL);
|
user_send_changed(s->user, "Display", NULL);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user