From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MS1pS-00056B-RQ for qemu-devel@nongnu.org; Sat, 18 Jul 2009 00:47:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MS1pO-00055i-BA for qemu-devel@nongnu.org; Sat, 18 Jul 2009 00:47:22 -0400 Received: from [199.232.76.173] (port=57729 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MS1pO-00055f-40 for qemu-devel@nongnu.org; Sat, 18 Jul 2009 00:47:18 -0400 Received: from mx2.redhat.com ([66.187.237.31]:50858) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MS1pN-0002kf-Kb for qemu-devel@nongnu.org; Sat, 18 Jul 2009 00:47:17 -0400 From: Glauber Costa Date: Sat, 18 Jul 2009 00:47:14 -0400 Message-Id: <1247892434-21209-1-git-send-email-glommer@redhat.com> Subject: [Qemu-devel] [PATCH] update server bits on vnc_update List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com, Gerd Hoffmann Since the server/guest split in vnc architecture, we no longer update the server bits on large updates. Result is screen gets garbled, specially on scroll actions. I must admit I don't fully understand our vnc code, but after a careful reading, it seemed to me the proposed patch would fix it, and it indeed, works. Gerd, Anthony, please tell me what you think of this approach. This fixes the following bugs for me: https://bugzilla.redhat.com/show_bug.cgi?id=503156 https://bugzilla.redhat.com/show_bug.cgi?id=507626 https://bugs.launchpad.net/qemu/+bug/397212 Signed-off-by: Glauber Costa CC: Gerd Hoffmann --- vnc.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/vnc.c b/vnc.c index de0ff87..acebdaf 100644 --- a/vnc.c +++ b/vnc.c @@ -262,9 +262,8 @@ static inline int vnc_and_bits(const uint32_t *d1, const uint32_t *d2, return 0; } -static void vnc_update(VncState *vs, int x, int y, int w, int h) +static void do_vnc_update(struct VncSurface *s, int x, int y, int w, int h) { - struct VncSurface *s = &vs->guest; int i; h += y; @@ -286,6 +285,13 @@ static void vnc_update(VncState *vs, int x, int y, int w, int h) vnc_set_bit(s->dirty[y], (x + i) / 16); } + +static void vnc_update(VncState *vs, int x, int y, int w, int h) +{ + do_vnc_update(&vs->guest, x, y, w, h); + do_vnc_update(&vs->server, x, y, w, h); +} + static void vnc_dpy_update(DisplayState *ds, int x, int y, int w, int h) { VncDisplay *vd = ds->opaque; -- 1.6.2.2