diff options
author | 2009-12-14 14:11:56 -0600 | |
---|---|---|
committer | 2009-12-19 08:26:20 -0600 | |
commit | 807c80b2596ce80c0d7a370932fa71ec475a90a9 (patch) | |
tree | a366b1c688f0fab67cd432b69b17baca43dd6834 /vnchextile.h | |
parent | Revert "pci: interrupt disable bit support" (diff) | |
download | qemu-kvm-807c80b2596ce80c0d7a370932fa71ec475a90a9.tar.gz qemu-kvm-807c80b2596ce80c0d7a370932fa71ec475a90a9.tar.bz2 qemu-kvm-807c80b2596ce80c0d7a370932fa71ec475a90a9.zip |
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 <ykaul@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 02c2b87fff97e77a1f6033fb09f53afa267c0c1e)
Diffstat (limited to 'vnchextile.h')
-rw-r--r-- | vnchextile.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/vnchextile.h b/vnchextile.h index c96ede340..432ed89af 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; |