Skip to content

Commit

Permalink
vnc: hextile: do not generate ForegroundSpecified and SubrectsColoure…
Browse files Browse the repository at this point in the history
…d 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 <ykaul@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
  • Loading branch information
Anthony Liguori committed Dec 18, 2009
1 parent d587e07 commit 02c2b87
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions vnchextile.h
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 02c2b87

Please sign in to comment.