X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Flogin%2Flogind-seat.c;h=feebcf4558febcb23e44ccaf0b07f88f1ba0b832;hb=dfd552707d43087a1e0079cdae9f5290e14b78e9;hp=f88738ab1676c769d8d6bbb3b87be6059f75be3d;hpb=118ecf32425a590ea266b5c2b6de7962bb242356;p=elogind.git diff --git a/src/login/logind-seat.c b/src/login/logind-seat.c index f88738ab1..feebcf455 100644 --- a/src/login/logind-seat.c +++ b/src/login/logind-seat.c @@ -246,8 +246,10 @@ int seat_set_active(Seat *s, Session *session) { old_active = s->active; s->active = session; - if (old_active) + if (old_active) { session_device_pause_all(old_active); + session_send_changed(old_active, "Active\0"); + } seat_apply_acls(s, old_active); @@ -425,6 +427,21 @@ int seat_attach_session(Seat *s, Session *session) { return 0; } +void seat_complete_switch(Seat *s) { + Session *session; + + assert(s); + + /* if no session-switch is pending or if it got canceled, do nothing */ + if (!s->pending_switch) + return; + + session = s->pending_switch; + s->pending_switch = NULL; + + seat_set_active(s, session); +} + bool seat_has_vts(Seat *s) { assert(s);