From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JqcaD-0006nj-Mz for qemu-devel@nongnu.org; Mon, 28 Apr 2008 19:16:29 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JqcaC-0006mN-7k for qemu-devel@nongnu.org; Mon, 28 Apr 2008 19:16:29 -0400 Received: from [199.232.76.173] (port=37677 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JqcaC-0006mK-1V for qemu-devel@nongnu.org; Mon, 28 Apr 2008 19:16:28 -0400 Received: from mtaout01-winn.ispmail.ntl.com ([81.103.221.47]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JqcaB-0002ZD-LG for qemu-devel@nongnu.org; Mon, 28 Apr 2008 19:16:27 -0400 Received: from aamtaout01-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout01-winn.ispmail.ntl.com with ESMTP id <20080428231936.RBJM27050.mtaout01-winn.ispmail.ntl.com@aamtaout01-winn.ispmail.ntl.com> for ; Tue, 29 Apr 2008 00:19:36 +0100 Received: from implementation.famille.thibault.fr ([82.21.96.230]) by aamtaout01-winn.ispmail.ntl.com with ESMTP id <20080428232044.PUOM219.aamtaout01-winn.ispmail.ntl.com@implementation.famille.thibault.fr> for ; Tue, 29 Apr 2008 00:20:44 +0100 Received: from samy by implementation.famille.thibault.fr with local (Exim 4.69) (envelope-from ) id 1JqcZw-00021q-2P for qemu-devel@nongnu.org; Tue, 29 Apr 2008 01:16:12 +0200 Date: Tue, 29 Apr 2008 00:16:12 +0100 From: Samuel Thibault Subject: Re: [Qemu-devel] [PATCH] ncurses: resize console if required Message-ID: <20080428231612.GD5002@implementation> References: <20080428035445.GA8787@tapir> <20080428085827.GA4537@implementation.uk.xensource.com> <20080428175631.GC8787@tapir> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20080428175631.GC8787@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 Carlo Marcelo Arenas Belon, le Mon 28 Apr 2008 12:56:31 -0500, a écrit : > On Mon, Apr 28, 2008 at 09:58:27AM +0100, Samuel Thibault wrote: > > Hello, > > > > Carlo Marcelo Arenas Belon, le Sun 27 Apr 2008 22:54:45 -0500, a écrit : > > > + printf("\033[8;25;80t"); > > > > You can not just spit out escape sequences like this without know the > > kind of terminal you're in, you know :) > > my original patch was checking the TERM variable for xterm or rxvt but since > CSI Window manipulation comes from dtterm I would expect most terminal > emulators to support that, do you have one that does not? My good old _real_ ampex232 TTY most probably doesn't (I can't check right now). > in the case of xterm with allowWindowOps = false the escape string gets just > ignored with no visible output, so expected the same from a terminal that > doesn't support it, If it supports CSI sequences. > > At least check the TERM environment variable for those kind you know > > support it. Also, this should probably go inside the curses_resize() > > function, so that when the guest resizes to e.g. 80x50, the xterm window > > gets resized too. > > from my tests, while booting a linux guest, curses_resize will be called with > a 66 x 3 geometry at least once, When it goes in graphical mode, yes. > and a first attempt to make the guest use a > resized console of 80x50 didn't reflect correctly in the curses side either Works fine for me. > my intention with this patch was to propose a simple solution to this problem > and hopefully get someone else with more experience in curses and terminal > emulations intrigued enough to give it a more complete spin. Ok. Samuel