aboutsummaryrefslogtreecommitdiff
path: root/vnc.c
diff options
context:
space:
mode:
authorbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2008-06-02 01:40:29 +0000
committerbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2008-06-02 01:40:29 +0000
commitb94eb43f6e1990e67bb31ad608b2a16bf38a58fe (patch)
tree05b159d9abe50c89d2ae2e8d92a71558508bc516 /vnc.c
parent89cdb6af04c16c5476221b1f2d25d8337ebbb391 (diff)
downloadqemu-b94eb43f6e1990e67bb31ad608b2a16bf38a58fe.zip
qemu-b94eb43f6e1990e67bb31ad608b2a16bf38a58fe.tar.gz
qemu-b94eb43f6e1990e67bb31ad608b2a16bf38a58fe.tar.bz2
Don't forget to save VNC FB dimensions after resize (Brad Campbell).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4644 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'vnc.c')
-rw-r--r--vnc.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/vnc.c b/vnc.c
index 75e4c0c..31118ee 100644
--- a/vnc.c
+++ b/vnc.c
@@ -307,14 +307,16 @@ static void vnc_dpy_resize(DisplayState *ds, int w, int h)
ds->width = w;
ds->height = h;
ds->linesize = w * vs->depth;
- if (vs->csock != -1 && vs->has_resize && size_changed) {
- vnc_write_u8(vs, 0); /* msg id */
- vnc_write_u8(vs, 0);
- vnc_write_u16(vs, 1); /* number of rects */
- vnc_framebuffer_update(vs, 0, 0, ds->width, ds->height, -223);
- vnc_flush(vs);
- vs->width = ds->width;
- vs->height = ds->height;
+ if (size_changed) {
+ vs->width = ds->width;
+ vs->height = ds->height;
+ if (vs->csock != -1 && vs->has_resize) {
+ vnc_write_u8(vs, 0); /* msg id */
+ vnc_write_u8(vs, 0);
+ vnc_write_u16(vs, 1); /* number of rects */
+ vnc_framebuffer_update(vs, 0, 0, ds->width, ds->height, -223);
+ vnc_flush(vs);
+ }
}
memset(vs->dirty_row, 0xFF, sizeof(vs->dirty_row));