diff options
Diffstat (limited to 'src/kmscon_terminal.c')
-rw-r--r-- | src/kmscon_terminal.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/kmscon_terminal.c b/src/kmscon_terminal.c index 740a27c..482d50f 100644 --- a/src/kmscon_terminal.c +++ b/src/kmscon_terminal.c @@ -580,7 +580,7 @@ static void write_event(struct tsm_vte *vte, const char *u8, size_t len, } int kmscon_terminal_register(struct kmscon_session **out, - struct kmscon_seat *seat) + struct kmscon_seat *seat, unsigned int vtnr) { struct kmscon_terminal *term; int ret; @@ -646,6 +646,12 @@ int kmscon_terminal_register(struct kmscon_session **out, if (ret) goto err_pty; + if (vtnr > 0) { + ret = kmscon_pty_set_vtnr(term->pty, vtnr); + if (ret) + goto err_pty; + } + ret = ev_eloop_new_fd(term->eloop, &term->ptyfd, kmscon_pty_get_fd(term->pty), EV_READABLE, pty_event, term); |