diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-12-02 13:53:13 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-02 13:53:13 -0500 |
commit | 8eceaa2291febc70d32d6791693cbbcad407d401 (patch) | |
tree | b29b810314505d76b1c2b1811aced08bdcde1a23 | |
parent | 779cccf8b421b99031884f4d2886e788ac77a6eb (diff) | |
parent | 8a2d54c24ab157c8acc669f6aa5af365abc71a70 (diff) |
Merge pull request #455 from n3rdopolis/patch-1
Attempt to fix #454
-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); |