From 2123ab5224a6e8fde8c52beab4de51d9712e285c Mon Sep 17 00:00:00 2001 From: Eduardo Habkost <ehabkost@redhat.com> Date: Tue, 10 Feb 2009 14:41:16 -0200 Subject: [PATCH 69/70] qemu: vnc: reset has_WMVi when new client connects Part of upstream commit 903e5d7c25ea0f26e2101ea2ef35e11ea2090049: Author: aliguori <aliguori> Date: Mon Jan 26 15:37:30 2009 +0000 vnc fixes and improvements (Stefano Stabellini) this patch fixes a bug and improves the generic pixel conversion function in vnc.c. The bug is that when a new vnc client connects we need to reset the flag has_WMVi but currently we don't. The generic pixel conversion function is vnc_convert_pixel and currently is not very efficient since uses the division and multiplication operators. To make it more efficient I changed to use bit shift operators instead. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Acked-by: Eduardo Habkost <ehabkost@redhat.com> RH-Upstream-status: applied(kvm/master) --- qemu/vnc.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/qemu/vnc.c b/qemu/vnc.c index 4fe9939..a455614 100644 --- a/qemu/vnc.c +++ b/qemu/vnc.c @@ -2286,6 +2286,7 @@ static void vnc_connect(VncState *vs) memset(vs->dirty_row, 0xFF, sizeof(vs->dirty_row)); vs->has_resize = 0; vs->has_hextile = 0; + vs->has_WMVi = 0; vs->ds->dpy_copy = NULL; vnc_update_client(vs); reset_keys(vs); -- 1.6.1