Add xoff and yoff to drawable->x and drawable->y in create_bits_picture().

These are 0, except when the drawable is a redirected window.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Soeren Sandmann 2009-09-11 04:03:06 +02:00 committed by Peter Hutterer
parent 2b00afec4b
commit f450be9992

View File

@ -336,7 +336,9 @@ create_bits_picture (PicturePtr pict,
fbGetDrawable (drawable, bits, stride, bpp, xoff, yoff);
bits = (FbBits*)((CARD8*)bits + drawable->y * stride * sizeof(FbBits) + drawable->x * (bpp / 8));
bits = (FbBits*)((CARD8*)bits +
(drawable->y + yoff) * stride * sizeof(FbBits) +
(drawable->x + xoff) * (bpp / 8));
image = pixman_image_create_bits (
pict->format, drawable->width, drawable->height,