Commit b94eb43f6e1990e67bb31ad608b2a16bf38a58fe

Authored by balrog
1 parent 89cdb6af

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
Showing 1 changed file with 10 additions and 8 deletions
... ... @@ -307,14 +307,16 @@ static void vnc_dpy_resize(DisplayState *ds, int w, int h)
307 307 ds->width = w;
308 308 ds->height = h;
309 309 ds->linesize = w * vs->depth;
310   - if (vs->csock != -1 && vs->has_resize && size_changed) {
311   - vnc_write_u8(vs, 0); /* msg id */
312   - vnc_write_u8(vs, 0);
313   - vnc_write_u16(vs, 1); /* number of rects */
314   - vnc_framebuffer_update(vs, 0, 0, ds->width, ds->height, -223);
315   - vnc_flush(vs);
316   - vs->width = ds->width;
317   - vs->height = ds->height;
  310 + if (size_changed) {
  311 + vs->width = ds->width;
  312 + vs->height = ds->height;
  313 + if (vs->csock != -1 && vs->has_resize) {
  314 + vnc_write_u8(vs, 0); /* msg id */
  315 + vnc_write_u8(vs, 0);
  316 + vnc_write_u16(vs, 1); /* number of rects */
  317 + vnc_framebuffer_update(vs, 0, 0, ds->width, ds->height, -223);
  318 + vnc_flush(vs);
  319 + }
318 320 }
319 321  
320 322 memset(vs->dirty_row, 0xFF, sizeof(vs->dirty_row));
... ...