aboutsummaryrefslogtreecommitdiff
path: root/backend/session
diff options
context:
space:
mode:
authornerdopolis <bluescreen_avenger@verizon.net>2020-09-01 20:00:33 -0400
committerSimon Ser <contact@emersion.fr>2020-09-04 11:46:54 +0200
commite44bed0c2b77c944e389efd026948d8ef1230cec (patch)
treee2cf4f9c56822d20db74fde0608275327ef4f90f /backend/session
parentfa05d3cde68de73df4cac9762f6623c6001651cc (diff)
Accommodate for CONFIG_VT=0, all TTYs are in seat0, but not all
seat0s have TTYs
Diffstat (limited to 'backend/session')
-rw-r--r--backend/session/logind.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/backend/session/logind.c b/backend/session/logind.c
index b9249ece..9c2515a8 100644
--- a/backend/session/logind.c
+++ b/backend/session/logind.c
@@ -130,8 +130,8 @@ static void logind_release_device(struct wlr_session *base, int fd) {
static bool logind_change_vt(struct wlr_session *base, unsigned vt) {
struct logind_session *session = logind_session_from_session(base);
- // Only seat0 has VTs associated with it
- if (strcmp(session->base.seat, "seat0") != 0) {
+ // Only if seat has VTs associated with it
+ if (!sd_seat_can_tty(session->base.seat)) {
return true;
}
@@ -791,7 +791,7 @@ static struct wlr_session *logind_session_create(struct wl_display *disp) {
}
snprintf(session->base.seat, sizeof(session->base.seat), "%s", seat);
- if (strcmp(seat, "seat0") == 0) {
+ if (sd_seat_can_tty(seat)) {
ret = sd_session_get_vt(session->id, &session->base.vtnr);
if (ret < 0) {
wlr_log(WLR_ERROR, "Session not running in virtual terminal");