aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki@daynix.com>2024-03-19 12:08:39 +0900
committerMarc-André Lureau <marcandre.lureau@redhat.com>2024-03-20 10:27:47 +0400
commit271a197425528f4448b3d351be25995abe901374 (patch)
tree1d6069c43e8563ef8a0fd50517699c06fc2f6e70
parentc62d54d0a8067ffb3d5b909276f7296d7df33fa7 (diff)
downloadqemu-271a197425528f4448b3d351be25995abe901374.zip
qemu-271a197425528f4448b3d351be25995abe901374.tar.gz
qemu-271a197425528f4448b3d351be25995abe901374.tar.bz2
ui/vc: Do not inherit the size of active console
A chardev-vc used to inherit the size of a graphic console when its size not explicitly specified, but it often did not make sense. If a chardev-vc is instantiated during the startup, the active graphic console has no content at the time, so it will have the size of graphic console placeholder, which contains no useful information. It's better to have the standard size of text console instead. Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20240319-console-v2-1-3fd6feef321a@daynix.com>
-rw-r--r--ui/console-vc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/console-vc.c b/ui/console-vc.c
index 9c13cc2..f22c8e2 100644
--- a/ui/console-vc.c
+++ b/ui/console-vc.c
@@ -990,8 +990,8 @@ static void vc_chr_open(Chardev *chr,
trace_console_txt_new(width, height);
if (width == 0 || height == 0) {
s = QEMU_TEXT_CONSOLE(object_new(TYPE_QEMU_TEXT_CONSOLE));
- width = qemu_console_get_width(NULL, 80 * FONT_WIDTH);
- height = qemu_console_get_height(NULL, 24 * FONT_HEIGHT);
+ width = 80 * FONT_WIDTH;
+ height = 24 * FONT_HEIGHT;
} else {
s = QEMU_TEXT_CONSOLE(object_new(TYPE_QEMU_FIXED_TEXT_CONSOLE));
}