From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:55328) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDdpR-00017l-EZ for qemu-devel@nongnu.org; Tue, 11 Oct 2011 11:01:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RDdpP-0005uY-SA for qemu-devel@nongnu.org; Tue, 11 Oct 2011 11:01:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51108) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDdpP-0005uG-Kf for qemu-devel@nongnu.org; Tue, 11 Oct 2011 11:01:11 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p9BF19ZA011735 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 11 Oct 2011 11:01:10 -0400 From: Alon Levy Date: Tue, 11 Oct 2011 16:58:40 +0200 Message-Id: <1318345120-22614-1-git-send-email-alevy@redhat.com> Subject: [Qemu-devel] [PATCH] console: console_select: check for nop List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kraxel@redhat.com Signed-off-by: Alon Levy --- qxl screen_dump is broken since f81bdefb6. That commit didn't introduce the problem, the problem is in qxl. But I've not managed to figure out the real problem yet. This patch works around it, but in a nice way - if you only have a single console or never set the other consoles active then there will not be a displaysurface reallocation which is the cause of the wrong rendering. To see rendering errors, run with sdl and spice, then do a screen dump. The sdl screen will be updated with zeros (not quite - it's pointing at a wrong location that is almost but not totally zeroed). console.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/console.c b/console.c index e43de92..7f0900f 100644 --- a/console.c +++ b/console.c @@ -1067,6 +1067,9 @@ void console_select(unsigned int index) if (index >= MAX_CONSOLES) return; + if (active_console == consoles[index]) { + return; + } if (active_console) { active_console->g_width = ds_get_width(active_console->ds); active_console->g_height = ds_get_height(active_console->ds); -- 1.7.6.4