diff mbox

VNC framebuffer block artefacts on qemu-kvm-0.12.1.1

Message ID 20100106135118.GA28640@amt.cnet (mailing list archive)
State New, archived
Headers show

Commit Message

Marcelo Tosatti Jan. 6, 2010, 1:51 p.m. UTC
None
diff mbox

Patch

diff --git a/vnchextile.h b/vnchextile.h
index 432ed89..c96ede3 100644
--- a/vnchextile.h
+++ b/vnchextile.h
@@ -73,7 +73,7 @@  static void CONCAT(send_hextile_tile_, NAME)(VncState *vs,
 	*last_bg = bg;
     }
 
-    if (n_colors < 3 && (!*has_fg || *last_fg != fg)) {
+    if (!*has_fg || *last_fg != fg) {
 	flags |= 0x04;
 	*has_fg = 1;
 	*last_fg = fg;
@@ -165,6 +165,8 @@  static void CONCAT(send_hextile_tile_, NAME)(VncState *vs,
 	    irow += ds_get_linesize(vs->ds) / sizeof(pixel_t);
 	}
 
+	/* A SubrectsColoured subtile invalidates the foreground color */
+	*has_fg = 0;
 	if (n_data > (w * h * sizeof(pixel_t))) {
 	    n_colors = 4;
 	    flags = 0x01;