diff options
author | Martin Pitt <martin.pitt@ubuntu.com> | 2014-11-20 15:28:12 +0100 |
---|---|---|
committer | Martin Pitt <martin.pitt@ubuntu.com> | 2014-11-20 15:28:12 +0100 |
commit | 5eef597e931b0428bb984dc2bf0736d032a9198c (patch) | |
tree | c24d24d36d083e227a6ba3c1b5ae5c40ae822cb2 /src/login/logind-seat.c | |
parent | e842803ae5f3f162fa51f30787c3b2423e3826cf (diff) | |
download | systemd-5eef597e931b0428bb984dc2bf0736d032a9198c.tar.gz |
Imported Upstream version 217
Diffstat (limited to 'src/login/logind-seat.c')
-rw-r--r-- | src/login/logind-seat.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/login/logind-seat.c b/src/login/logind-seat.c index 3114de84de..9992195151 100644 --- a/src/login/logind-seat.c +++ b/src/login/logind-seat.c @@ -275,8 +275,13 @@ int seat_switch_to(Seat *s, unsigned int num) { if (!num) return -EINVAL; - if (num >= s->position_count || !s->positions[num]) + if (num >= s->position_count || !s->positions[num]) { + /* allow switching to unused VTs to trigger auto-activate */ + if (seat_has_vts(s) && num < 64) + return chvt(num); + return -EINVAL; + } return session_activate(s->positions[num]); } |