* [Qemu-devel] [PATCH 0/2] v2: Fix monitor console in curses mode
@ 2008-08-25 17:29 Ryan Harper
2008-08-25 17:29 ` [Qemu-devel] [PATCH 1/2] v2: Fix text console size/resize when using curses Ryan Harper
2008-08-25 17:29 ` [Qemu-devel] [PATCH 2/2] Fix typo in console.c comment Ryan Harper
0 siblings, 2 replies; 3+ messages in thread
From: Ryan Harper @ 2008-08-25 17:29 UTC (permalink / raw)
To: qemu-devel; +Cc: Ryan Harper, kvm, Ian Kirk
v2: dropped initial display size changes in curses.c -- not needed.
The current curses code doesn't adjust the curses and text console display to
match the size of the terminal and fails to adjust properly after a resize.
The attach patches ensure that text_console_resize events adjust the
Textconsole display area so they stay the same size as the curses display.
The result is that we no longer see broken output like:
QEMU 0.9.1 monitor - type 'help' for more information
(qemu)
(qemu)
(qemu)
and you can resize your terminal window and the monitor and serial text consoles
adjust properly as well.
The second patch is a trivial typo fix in the comments in console.c
Comments welcome since I'm new to both curses and qemu console code.
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Qemu-devel] [PATCH 1/2] v2: Fix text console size/resize when using curses
2008-08-25 17:29 [Qemu-devel] [PATCH 0/2] v2: Fix monitor console in curses mode Ryan Harper
@ 2008-08-25 17:29 ` Ryan Harper
2008-08-25 17:29 ` [Qemu-devel] [PATCH 2/2] Fix typo in console.c comment Ryan Harper
1 sibling, 0 replies; 3+ messages in thread
From: Ryan Harper @ 2008-08-25 17:29 UTC (permalink / raw)
To: qemu-devel; +Cc: Ryan Harper, kvm, Ian Kirk
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 <ryanh@us.ibm.com>
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)
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Qemu-devel] [PATCH 2/2] Fix typo in console.c comment
2008-08-25 17:29 [Qemu-devel] [PATCH 0/2] v2: Fix monitor console in curses mode Ryan Harper
2008-08-25 17:29 ` [Qemu-devel] [PATCH 1/2] v2: Fix text console size/resize when using curses Ryan Harper
@ 2008-08-25 17:29 ` Ryan Harper
1 sibling, 0 replies; 3+ messages in thread
From: Ryan Harper @ 2008-08-25 17:29 UTC (permalink / raw)
To: qemu-devel; +Cc: Ryan Harper, kvm
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
diff --git a/console.c b/console.c
index 89bdc52..c7a5a80 100644
--- a/console.c
+++ b/console.c
@@ -172,7 +172,7 @@ void vga_hw_screen_dump(const char *filename)
previous_active_console = active_console;
active_console = consoles[0];
/* There is currently no way of specifying which screen we want to dump,
- so always dump the dirst one. */
+ so always dump the first one. */
if (consoles[0]->hw_screen_dump)
consoles[0]->hw_screen_dump(consoles[0]->hw, filename);
active_console = previous_active_console;
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-08-25 17:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-25 17:29 [Qemu-devel] [PATCH 0/2] v2: Fix monitor console in curses mode Ryan Harper
2008-08-25 17:29 ` [Qemu-devel] [PATCH 1/2] v2: Fix text console size/resize when using curses Ryan Harper
2008-08-25 17:29 ` [Qemu-devel] [PATCH 2/2] Fix typo in console.c comment Ryan Harper
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).