diff options
author | Kenny Levinsen <kl@kl.wtf> | 2020-08-03 02:55:07 +0200 |
---|---|---|
committer | Kenny Levinsen <kl@kl.wtf> | 2020-08-03 02:55:07 +0200 |
commit | 98a4a4ff673d1325dc6dc9a46a77f587b8b760cb (patch) | |
tree | cb9bcf41910890f78a624e7e6f6bc85acbfae1a3 | |
parent | 250adee852612576093639fa13c97bd02483dcf6 (diff) |
seat: Add VT cleanup on switch to empty VT
VTs were being cleaned up the active client of a VT went away, or if we
were acking a kernel VT switch request. However, no cleanup was done if
the user had reqested a session switch to a different VT.
Duplicate the VT cleanup to the VT switch condition.
-rw-r--r-- | seatd/seat.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/seatd/seat.c b/seatd/seat.c index e6d9950..6358f7d 100644 --- a/seatd/seat.c +++ b/seatd/seat.c @@ -547,6 +547,13 @@ int seat_activate(struct seat *seat) { // If we're asked to do a simple VT switch, do that if (seat->next_vt > 0) { log_info("executing VT switch"); + if (seat->curttyfd != -1) { + terminal_set_process_switching(seat->curttyfd, false); + terminal_set_keyboard(seat->curttyfd, true); + terminal_set_graphics(seat->curttyfd, false); + close(seat->curttyfd); + seat->curttyfd = -1; + } terminal_switch_vt(ttyfd, seat->next_vt); seat->next_vt = 0; close(ttyfd); |