From: Anthony Liguori Date: Mon, 14 Dec 2009 20:11:56 +0000 (-0600) Subject: vnc: hextile: do not generate ForegroundSpecified and SubrectsColoured tiles X-Git-Tag: TizenStudio_2.0_p2.3.2~208^2~9281 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=02c2b87fff97e77a1f6033fb09f53afa267c0c1e;p=sdk%2Femulator%2Fqemu.git vnc: hextile: do not generate ForegroundSpecified and SubrectsColoured tiles This violates the RFB specification (section 6.6.4). It happens to work with most clients but it's still wrong. Reported-by: Yaniv Kaul Signed-off-by: Anthony Liguori --- diff --git a/vnchextile.h b/vnchextile.h index c96ede3..432ed89 100644 --- a/vnchextile.h +++ b/vnchextile.h @@ -73,7 +73,7 @@ static void CONCAT(send_hextile_tile_, NAME)(VncState *vs, *last_bg = bg; } - if (!*has_fg || *last_fg != fg) { + if (n_colors < 3 && (!*has_fg || *last_fg != fg)) { flags |= 0x04; *has_fg = 1; *last_fg = fg; @@ -165,8 +165,6 @@ 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;