From f450be999268d118b384c04ea070c87ad48c4c59 Mon Sep 17 00:00:00 2001 From: Soeren Sandmann Date: Fri, 11 Sep 2009 04:03:06 +0200 Subject: [PATCH] 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 --- fb/fbpict.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fb/fbpict.c b/fb/fbpict.c index dd9cefe15..2fbef15c3 100644 --- a/fb/fbpict.c +++ b/fb/fbpict.c @@ -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,