find the right offset in the source data for parent relative
This commit is contained in:
parent
49eea4715f
commit
cf4e1780d0
1 changed files with 2 additions and 1 deletions
|
@ -118,7 +118,8 @@ void x_paint(Window win, Appearance *l)
|
||||||
|
|
||||||
if (l->surface.data.planar.grad == Background_ParentRelative) {
|
if (l->surface.data.planar.grad == Background_ParentRelative) {
|
||||||
sw = l->surface.data.planar.parent->area.width;
|
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;
|
dest = l->surface.data.planar.pixel_data;
|
||||||
for (i = parenty; i < parenty + h; i++, source += sw, dest += w) {
|
for (i = parenty; i < parenty + h; i++, source += sw, dest += w) {
|
||||||
memcpy(dest, source, w * sizeof(pixel32));
|
memcpy(dest, source, w * sizeof(pixel32));
|
||||||
|
|
Loading…
Reference in a new issue