Index: ChangeLog =================================================================== --- ChangeLog (revision 564) +++ ChangeLog (working copy) @@ -0,0 +0,10 @@ +2007-03-29 Mark McLoughlin + + Fix the non-XDAMAGE, non-XSHM support (bug #423887) + + * server/vino-fb.c: (vino_fb_create_image): create the + XImage data only after allocating the XImage itself + where the actual rowstride is calculated, rather than + making a lame attempt at guessing what rowstride will + be used. + Index: server/vino-fb.c =================================================================== --- server/vino-fb.c (revision 564) +++ server/vino-fb.c (working copy) @@ -287,25 +287,21 @@ if (!must_use_x_shm) { - int rowstride = width * (depth / 8); - char *data; - - data = malloc (rowstride * height); - if (!data) - return FALSE; - *image = XCreateImage (vfb->priv->xdisplay, DefaultVisual (vfb->priv->xdisplay, 0), depth, ZPixmap, 0, - data, + NULL, width, height, - 8, - rowstride); - if (!*image) - free (data); + 32, + 0); + if (*image && !((*image)->data = malloc ((*image)->bytes_per_line * height))) + { + XDestroyImage(*image); + *image = NULL; + } return FALSE; }