From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JqYrS-0001vu-Ia for qemu-devel@nongnu.org; Mon, 28 Apr 2008 15:18:02 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JqYrP-0001pW-Gt for qemu-devel@nongnu.org; Mon, 28 Apr 2008 15:18:01 -0400 Received: from [199.232.76.173] (port=46280 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JqYrP-0001pB-BQ for qemu-devel@nongnu.org; Mon, 28 Apr 2008 15:17:59 -0400 Received: from ug-out-1314.google.com ([66.249.92.174]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JqYrO-000884-UZ for qemu-devel@nongnu.org; Mon, 28 Apr 2008 15:17:59 -0400 Received: by ug-out-1314.google.com with SMTP id m2so894190uge.4 for ; Mon, 28 Apr 2008 12:17:57 -0700 (PDT) Message-ID: Date: Mon, 28 Apr 2008 21:17:56 +0200 From: "andrzej zaborowski" Subject: Re: [Qemu-devel] [PATCH] ncurses: resize console if required In-Reply-To: <20080428173113.GB8787@tapir> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080428035445.GA8787@tapir> <20080428101415.GD16597@networkno.de> <20080428173113.GB8787@tapir> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On 28/04/2008, Carlo Marcelo Arenas Belon wrote: > 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. It's only this way because SDL uses 640x400, but it can change when the vga starts living. For example the text mode ms windows installer (80x43 or something) worked fine for me with -curses. > > 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. To be honest I wasn't aware that there's a sequence to request terminal size change. "man console_codes" on my system doesn't list this sequence and also it doesn't seem to have any effect in gnome-terminal. This backend however is the curses backend, not terminal backend and even if the sequence worked, we should only use what curses can provide (this means that we don't even need a unix terminal). It seems that curses generally wants programs to be aware of the terminal size and conform, rather than have any say. So that would be a policy change also. Regards -- Please do not print this email unless absolutely necessary. Spread environmental awareness.