qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alon Levy <alevy@redhat.com>
To: qemu-devel@nongnu.org
Cc: kraxel@redhat.com
Subject: [Qemu-devel] [PATCH] console: console_select: check for nop
Date: Tue, 11 Oct 2011 16:58:40 +0200	[thread overview]
Message-ID: <1318345120-22614-1-git-send-email-alevy@redhat.com> (raw)

Signed-off-by: Alon Levy <alevy@redhat.com>
---
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

                 reply	other threads:[~2011-10-11 15:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1318345120-22614-1-git-send-email-alevy@redhat.com \
    --to=alevy@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).