chiark / gitweb /
logind: Don't try to emit a change signal for the 'Sessions' property (#5211)
authorafrantzis <alexandros.frantzis@canonical.com>
Fri, 3 Feb 2017 01:39:26 +0000 (03:39 +0200)
committerSven Eden <yamakuzure@gmx.net>
Mon, 17 Jul 2017 15:58:36 +0000 (17:58 +0200)
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.

src/login/logind-seat.c
src/login/logind-session.c

index f94d7a22a12aef95209b691de7cf333cabc31d67..01b9ec17b80a289b8b38ad6e0a98574700fbbf6f 100644 (file)
@@ -547,8 +547,6 @@ int seat_attach_session(Seat *s, Session *session) {
         LIST_PREPEND(sessions_by_seat, s->sessions, 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
          * seats without VTs, we automatically activate new sessions. */
         if (!seat_has_vts(s))
index 0799a98f2428b8eaf8946b273513043e1e1485b6..b6456ce251b83c1fa64daa898753d941fd5d775e 100644 (file)
@@ -617,12 +617,10 @@ int session_start(Session *s) {
 
         /* Send signals */
         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->active == s)
-                        seat_send_changed(s->seat, "Sessions", "ActiveSession", NULL);
-                else
-                        seat_send_changed(s->seat, "Sessions", NULL);
+                        seat_send_changed(s->seat, "ActiveSession", NULL);
         }
 
         return 0;
@@ -750,11 +748,10 @@ int session_finalize(Session *s) {
                         seat_set_active(s->seat, NULL);
 
                 seat_save(s->seat);
-                seat_send_changed(s->seat, "Sessions", NULL);
         }
 
         user_save(s->user);
-        user_send_changed(s->user, "Sessions", "Display", NULL);
+        user_send_changed(s->user, "Display", NULL);
 
         return 0;
 }