diff options
author | emersion <contact@emersion.fr> | 2017-12-14 20:31:18 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2017-12-14 20:31:18 +0100 |
commit | 466e86b7b2cbefa55ad5b85a97ee8257c24cb81b (patch) | |
tree | cc1691ec5abefdffcb8ac6312574ffa03bc4049a /backend/session | |
parent | eb763439f75d3c9174280d0c75ef44941dd99340 (diff) | |
parent | a9fb071d49b244b72846b384a9e2ef2d9b03a05f (diff) |
Merge branch 'master' into surface-transform
Diffstat (limited to 'backend/session')
-rw-r--r-- | backend/session/logind.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/backend/session/logind.c b/backend/session/logind.c index daff75b6..e9d4c8f3 100644 --- a/backend/session/logind.c +++ b/backend/session/logind.c @@ -347,12 +347,6 @@ static struct wlr_session *logind_session_create(struct wl_display *disp) { goto error; } - ret = sd_session_get_vt(session->id, &session->base.vtnr); - if (ret < 0) { - wlr_log(L_ERROR, "Session not running in virtual terminal"); - goto error; - } - char *seat; ret = sd_session_get_seat(session->id, &seat); if (ret < 0) { @@ -360,6 +354,14 @@ static struct wlr_session *logind_session_create(struct wl_display *disp) { goto error; } snprintf(session->base.seat, sizeof(session->base.seat), "%s", seat); + + if (strcmp(seat, "seat0") == 0) { + ret = sd_session_get_vt(session->id, &session->base.vtnr); + if (ret < 0) { + wlr_log(L_ERROR, "Session not running in virtual terminal"); + goto error; + } + } free(seat); ret = sd_bus_default_system(&session->bus); |