From: Dana Jansens Date: Wed, 2 Apr 2003 04:30:57 +0000 (+0000) Subject: find the right offset in the source data for parent relative X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=cf4e1780d0038fa03f16a8f92d954f667fa47c64;p=chaz%2Fopenbox find the right offset in the source data for parent relative --- 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));