diff --git a/src/kmscon_main.c b/src/kmscon_main.c index 4956456..0efd34d 100644 --- a/src/kmscon_main.c +++ b/src/kmscon_main.c @@ -147,7 +147,7 @@ static int app_seat_new(struct kmscon_app *app, struct app_seat **out, { struct app_seat *seat; int ret; - unsigned int i; + unsigned int i, types; bool found; found = false; @@ -186,8 +186,12 @@ static int app_seat_new(struct kmscon_app *app, struct app_seat **out, goto err_free; } + types = UTERM_VT_FAKE; + if (!app->conf->listen) + types |= UTERM_VT_REAL; + ret = kmscon_seat_new(&seat->seat, app->conf_ctx, app->eloop, app->vtm, - sname, app_seat_event, seat); + types, sname, app_seat_event, seat); if (ret) { if (ret == -ERANGE) log_debug("ignoring seat %s as it already has a seat manager", diff --git a/src/kmscon_seat.c b/src/kmscon_seat.c index 0493f84..5a93211 100644 --- a/src/kmscon_seat.c +++ b/src/kmscon_seat.c @@ -631,6 +631,7 @@ int kmscon_seat_new(struct kmscon_seat **out, struct conf_ctx *main_conf, struct ev_eloop *eloop, struct uterm_vt_master *vtm, + unsigned int vt_types, const char *seatname, kmscon_seat_cb_t cb, void *data) @@ -638,7 +639,6 @@ int kmscon_seat_new(struct kmscon_seat **out, struct kmscon_seat *seat; int ret; struct kmscon_session *s; - unsigned int allowed_types; if (!out || !eloop || !vtm || !seatname) return -EINVAL; @@ -689,12 +689,8 @@ int kmscon_seat_new(struct kmscon_seat **out, if (ret) goto err_input; - allowed_types = UTERM_VT_FAKE; - if (!seat->conf->listen) - allowed_types |= UTERM_VT_REAL; - ret = uterm_vt_allocate(seat->vtm, &seat->vt, - allowed_types, seat->name, + vt_types, seat->name, seat->input, seat->conf->vt, seat_vt_event, seat); if (ret) diff --git a/src/kmscon_seat.h b/src/kmscon_seat.h index 4a306ea..51c9e33 100644 --- a/src/kmscon_seat.h +++ b/src/kmscon_seat.h @@ -74,6 +74,7 @@ int kmscon_seat_new(struct kmscon_seat **out, struct conf_ctx *main_conf, struct ev_eloop *eloop, struct uterm_vt_master *vtm, + unsigned int vt_types, const char *seatname, kmscon_seat_cb_t cb, void *data);