aboutsummaryrefslogtreecommitdiff
path: root/backend/session/logind.c
diff options
context:
space:
mode:
Diffstat (limited to 'backend/session/logind.c')
-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");