Revision 6ed391bf ui/vnc.c

b/ui/vnc.c
1645 1645
                                       int x_position, int y_position,
1646 1646
                                       int w, int h)
1647 1647
{
1648
    int i;
1649
    const size_t width = ds_get_width(vs->ds) / 16;
1650

  
1648 1651
    if (y_position > ds_get_height(vs->ds))
1649 1652
        y_position = ds_get_height(vs->ds);
1650 1653
    if (y_position + h >= ds_get_height(vs->ds))
1651 1654
        h = ds_get_height(vs->ds) - y_position;
1652 1655

  
1653
    int i;
1654 1656
    vs->need_update = 1;
1655 1657
    if (!incremental) {
1656 1658
        vs->force_update = 1;
1657 1659
        for (i = 0; i < h; i++) {
1658
            bitmap_set(vs->dirty[y_position + i], x_position / 16, w / 16);
1660
            bitmap_set(vs->dirty[y_position + i], 0, width);
1661
            bitmap_clear(vs->dirty[y_position + i], width,
1662
                         VNC_DIRTY_WORDS * BITS_PER_LONG - width);
1659 1663
        }
1660 1664
    }
1661 1665
}

Also available in: Unified diff