Revision 1d4b638a

b/vnc.c
529 529
    if (vs->csock == -1 || !vnc_has_feature(vs, VNC_FEATURE_RESIZE)) {
530 530
        return;
531 531
    }
532
    if (vs->client_width == ds_get_width(ds) &&
533
        vs->client_height == ds_get_height(ds)) {
534
        return;
535
    }
532 536
    vs->client_width = ds_get_width(ds);
533 537
    vs->client_height = ds_get_height(ds);
534 538
    vnc_write_u8(vs, VNC_MSG_SERVER_FRAMEBUFFER_UPDATE);
......
541 545

  
542 546
static void vnc_dpy_resize(DisplayState *ds)
543 547
{
544
    int size_changed;
545 548
    VncDisplay *vd = ds->opaque;
546 549
    VncState *vs;
547 550

  
......
559 562
        vd->guest.ds = qemu_mallocz(sizeof(*vd->guest.ds));
560 563
    if (ds_get_bytes_per_pixel(ds) != vd->guest.ds->pf.bytes_per_pixel)
561 564
        console_color_init(ds);
562
    size_changed = ds_get_width(ds) != vd->guest.ds->width ||
563
                   ds_get_height(ds) != vd->guest.ds->height;
564 565
    *(vd->guest.ds) = *(ds->surface);
565 566
    memset(vd->guest.dirty, 0xFF, sizeof(vd->guest.dirty));
566 567

  
567 568
    QTAILQ_FOREACH(vs, &vd->clients, next) {
568 569
        vnc_colordepth(vs);
569
        if (size_changed) {
570
            vnc_desktop_resize(vs);
571
        }
570
        vnc_desktop_resize(vs);
572 571
        if (vs->vd->cursor) {
573 572
            vnc_cursor_define(vs);
574 573
        }

Also available in: Unified diff