[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] ncurses: resize console if required
From: |
Carlo Marcelo Arenas Belon |
Subject: |
Re: [Qemu-devel] [PATCH] ncurses: resize console if required |
Date: |
Mon, 28 Apr 2008 12:31:13 -0500 |
User-agent: |
Mutt/1.4.1i |
On Mon, Apr 28, 2008 at 11:14:15AM +0100, Thiemo Seufer wrote:
> Carlo Marcelo Arenas Belon wrote:
> > The following patch instructs qemu to print an escape command to resize the
> > curses console to 80x25 if detected to have a different geometry (xterm and
> > friends use 80x24 by default).
>
> Sounds like this should be specific to the PC/VGA emulation.
not sure what you mean, but the curses.c emulation assumes (and is hardcoded)
to a 80x25 console anyway.
this patch only checks the window size of the console that is being used and
sends it an escape command to change its size to what the curses console will
use so that they match; otherwise if starting qemu from an 80x24 xterm with
-curses you won't be able to see the last line of the console until the window
is resized.
Carlo
> > ---
> > Index: curses.c
> > ===================================================================
> > --- curses.c (revision 4274)
> > +++ curses.c (working copy)
> > @@ -367,6 +367,11 @@
> >
> > invalidate = 1;
> >
> > + /* check size of console and try to adjust if needed */
> > + getmaxyx(stdscr, gheight, gwidth);
> > + if ((gwidth != 80) || (gheight != 25)) {
> > + printf("\033[8;25;80t");
> > + }
> > /* Standard VGA initial text mode dimensions */
> > curses_resize(ds, 80, 25);
> > }
> >