@@ -527,6 +527,15 @@ static void vnc_dpy_resize(DisplayState *ds)
vd->server->data = qemu_mallocz(vd->server->linesize *
vd->server->height);
+ printf("vnc_dpy_resize: linesize = %d, height = %d, bpp = %d, "
+ "width = %d, height = %d, width%%16 = %d, data = %p\n",
+ vd->server->linesize, vd->server->height,
+ ds_get_bytes_per_pixel(ds),
+ ds_get_width(ds), ds_get_height(ds),
+ ds_get_width(ds) % 16,
+ vd->server->data);
+
+
/* guest surface */
if (!vd->guest.ds)
vd->guest.ds = qemu_mallocz(sizeof(*vd->guest.ds));
@@ -1740,7 +1749,7 @@ static void framebuffer_update_request(VncState
*vs, int incremental,
vs->force_update = 1;
for (i = 0; i < h; i++) {
vnc_set_bits(vs->dirty[y_position + i],
- (ds_get_width(vs->ds) / 16), VNC_DIRTY_WORDS);
+ ((ds_get_width(vs->ds) + 15) / 16), VNC_DIRTY_WORDS);
}
}