From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LSYQm-0007ug-FV for qemu-devel@nongnu.org; Thu, 29 Jan 2009 10:03:48 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LSYQi-0007sN-Bv for qemu-devel@nongnu.org; Thu, 29 Jan 2009 10:03:47 -0500 Received: from [199.232.76.173] (port=56924 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LSYQi-0007s9-4H for qemu-devel@nongnu.org; Thu, 29 Jan 2009 10:03:44 -0500 Received: from smtp.ctxuk.citrix.com ([62.200.22.115]:15727 helo=SMTP.EU.CITRIX.COM) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LSYQh-0006Zq-J8 for qemu-devel@nongnu.org; Thu, 29 Jan 2009 10:03:43 -0500 Message-ID: <4981C347.8090906@eu.citrix.com> Date: Thu, 29 Jan 2009 14:55:03 +0000 From: Stefano Stabellini MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: More displaystate fallout? References: <20090118231436.GA9565@saturn.kn-bremen.de> <20090120231248.GA13951@saturn.kn-bremen.de> <437083beafc472e92354fb05f211b149@iem.pw.edu.pl> <497714E4.5050206@eu.citrix.com> <49775F63.9020009@mail.berlios.de> <49776647.4090502@eu.citrix.com> <497794DA.1090405@mail.berlios.de> In-Reply-To: <497794DA.1090405@mail.berlios.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 I did not receive any input on this but since I believe this patch fixes a real problem I am going to send it to the list anyway. This patch fixes an initialization issue in case there is no graphic card (-vga none) and the first console has a fixed size, bigger than 640x480 (-monitor 800x600). Signed-off-by: Stefano Stabellini --- diff --git a/console.c b/console.c index dbb3b70..e02cf63 100644 --- a/console.c +++ b/console.c @@ -1419,13 +1419,22 @@ CharDriverState *text_console_init(const char *p) void text_consoles_set_display(DisplayState *ds) { int i; + TextConsole *s; for (i = 0; i < n_text_consoles; i++) { text_console_do_init(text_consoles[i], ds, text_console_strs[i]); qemu_free(text_console_strs[i]); } - n_text_consoles = 0; + + /* If there are no graphic cards and the first console has a fixed + * size we need to resize the screen surface according to the size + * of the first console */ + s = consoles[0]; + if (s && s->console_type == TEXT_CONSOLE_FIXED_SIZE) { + ds->surface = qemu_resize_displaysurface(ds->surface, s->g_width, s->g_height, 32, 4 * s->g_width); + dpy_resize(ds); + } } void qemu_console_resize(DisplayState *ds, int width, int height)