diff --git a/ui/console-vc.c b/ui/console-vc.c index 53d9e9d39b..99cc8f09c8 100644 --- a/ui/console-vc.c +++ b/ui/console-vc.c @@ -115,12 +115,19 @@ static int vc_chr_write(Chardev *chr, const uint8_t *buf, int len) return vt100_input(&s->vt, buf, len); } +static void text_console_chr_resize(QemuTextConsole *s) +{ + qemu_chr_resize(s->chr, s->vt.width, s->vt.height); +} + static void text_console_invalidate(void *opaque) { QemuTextConsole *s = QEMU_TEXT_CONSOLE(opaque); if (!QEMU_IS_FIXED_TEXT_CONSOLE(s)) { vt100_set_image(&s->vt, QEMU_CONSOLE(s)->surface->image); + text_console_chr_resize(s); + /* XXX Shouldn't qemu_text_console_update_size() also be called here? */ } vt100_refresh(&s->vt); } @@ -254,6 +261,7 @@ static bool vc_chr_open(Chardev *chr, ChardevBackend *backend, Error **errp) s->vt.t_attrib = TEXT_ATTRIBUTES_DEFAULT; } + text_console_chr_resize(s); qemu_chr_be_event(chr, CHR_EVENT_OPENED); qemu_console_notify(QEMU_CONSOLE_ADDED, QEMU_CONSOLE(s)); return true;