From mboxrd@z Thu Jan 1 00:00:00 1970 From: "andrzej zaborowski" Subject: Re: [Qemu-devel] [PATCH 1/1][RESEND] v2: Fix text console size/resize when using curses Date: Mon, 15 Sep 2008 20:42:06 +0200 Message-ID: References: <1220544638-1972-1-git-send-email-ryanh@us.ibm.com> <1220544638-1972-2-git-send-email-ryanh@us.ibm.com> <20080915173503.GT17312@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, "Ian Kirk" , "Paul Brook" To: "Ryan Harper" Return-path: Received: from rv-out-0506.google.com ([209.85.198.235]:7825 "EHLO rv-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752671AbYIOSmH (ORCPT ); Mon, 15 Sep 2008 14:42:07 -0400 Received: by rv-out-0506.google.com with SMTP id k40so2273841rvb.1 for ; Mon, 15 Sep 2008 11:42:06 -0700 (PDT) In-Reply-To: <20080915173503.GT17312@us.ibm.com> Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: 2008/9/15 Ryan Harper : > * andrzej zaborowski [2008-09-15 11:51]: >> Hi, > > Hello, > >> >> 2008/9/4 Ryan Harper : >> > 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: >> >> It seems that this was broken by r4812. Your patch looks correct but > > Thanks for taking a look, > >> I think it will prevent things like -serial vc:80Cx24C from working as >> documented. There's a conflict here: either virtual consoles have >> commandline-set fixed size or they adjust to the window size like >> before r4812 and don't have parts that don't fit on the screen. The >> SDL window is not resizable but the curses window is always resizable. >> I propose to add TEXT_CONSOLE_FIXED_SIZE back, it was removed by >> r4812. I will do this unless there are better ideas. > > I'll test the -serial to see if that breaks with the current patch.. > I'm also looking at an alternative. I think that in curses.c if on > window change event we can send a qemu_console_resize() to the text > consoles with the new width,height, that does the work of getting the > width/height in sync. I'll send an update if I get that working. The TEXT_CONSOLE_FIXED_SIZE approach worked ok, too, and it's generic (i.e. if in sdl.c you make the SDL window resizable then it'll start working for SDL automatically). > >> >> Another idea would be to set the default console size to 640x400 and >> agree to not support terminals < 80x24. > > I'm not sure that would fix it completely, I'm pretty sure the output > still looks broken even if your terminal is bigger than the min size > required. Right, at the moment it is broken because curses.c assumes that text consoles automatically resized to ds->width,ds->height and they didn't, they keep the size given through vc:XxY or 800x600 if none was given. Regards