[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/1][RESEND] v2: Fix text console size/resize when u
From: |
Ryan Harper |
Subject: |
[Qemu-devel] [PATCH 1/1][RESEND] v2: Fix text console size/resize when using curses |
Date: |
Thu, 4 Sep 2008 11:10:38 -0500 |
v2: drop initial size adjustment, not needed.
Resize events fail to ensure that both the text console and curses display areas
are the same size; this causes broken output like:
QEMU 0.9.1 monitor - type 'help' for more information
(qemu)
(qemu)
(qemu)
To fix this, ensure that the display width and the text area width are sync for
text consoles on refresh; also force a resize event whenever we invalidate the
text console.
Signed-off-by: Ryan Harper <address@hidden>
diff --git a/console.c b/console.c
index 1c94980..89bdc52 100644
--- a/console.c
+++ b/console.c
@@ -608,6 +608,9 @@ static void console_refresh(TextConsole *s)
s->text_y[0] = 0;
s->text_x[1] = s->width - 1;
s->text_y[1] = s->height - 1;
+ /* ensure that textconsole area is the same size as the display */
+ s->g_width = s->ds->width;
+ s->g_height = s->ds->height;
s->cursor_invalidate = 1;
return;
}
@@ -1158,6 +1161,8 @@ static void text_console_invalidate(void *opaque)
TextConsole *s = (TextConsole *) opaque;
console_refresh(s);
+ /* resize if needed */
+ text_console_resize(s);
}
static void text_console_update(void *opaque, console_ch_t *chardata)