From cf4e1780d0038fa03f16a8f92d954f667fa47c64 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Wed, 2 Apr 2003 04:30:57 +0000 Subject: [PATCH] find the right offset in the source data for parent relative --- render/render.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/render/render.c b/render/render.c index 4c77cfb1..de45c093 100644 --- a/render/render.c +++ b/render/render.c @@ -118,7 +118,8 @@ void x_paint(Window win, Appearance *l) if (l->surface.data.planar.grad == Background_ParentRelative) { sw = l->surface.data.planar.parent->area.width; - source = l->surface.data.planar.parent->surface.data.planar.pixel_data; + source = l->surface.data.planar.parent->surface.data.planar.pixel_data + + l->surface.data.planar.parentx + sw * parenty; dest = l->surface.data.planar.pixel_data; for (i = parenty; i < parenty + h; i++, source += sw, dest += w) { memcpy(dest, source, w * sizeof(pixel32)); -- 2.45.2