]> Dogcows Code - chaz/openbox/commitdiff
let there be parentrelative
authorDerek Foreman <manmower@gmail.com>
Wed, 2 Apr 2003 00:17:35 +0000 (00:17 +0000)
committerDerek Foreman <manmower@gmail.com>
Wed, 2 Apr 2003 00:17:35 +0000 (00:17 +0000)
render/render.c

index 9d4a2c67eabe0c151070ccf6c0e2f023417bd80e..4c77cfb123128dfa7c1201e44eeb5837e8eff030 100644 (file)
@@ -89,13 +89,14 @@ void truecolor_startup(void)
 
 void x_paint(Window win, Appearance *l)
 {
-    int i, transferred = 0, sw, sh;
-    pixel32 *source;
+    int i, transferred = 0, sw;
+    pixel32 *source, *dest;
     Pixmap oldp;
     int x = l->area.x;
     int y = l->area.y;
     int w = l->area.width;
     int h = l->area.height;
+    int parenty = l->surface.data.planar.parenty;
 
     if (w <= 0 || h <= 0 || x+w <= 0 || y+h <= 0) return;
 
@@ -117,8 +118,11 @@ 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.pixel_data;
-/*        for (i = */
+        source = l->surface.data.planar.parent->surface.data.planar.pixel_data;
+        dest = l->surface.data.planar.pixel_data;
+        for (i = parenty; i < parenty + h; i++, source += sw, dest += w) {
+            memcpy(dest, source, w * sizeof(pixel32));
+        }
     }
     else if (l->surface.data.planar.grad == Background_Solid)
         gradient_solid(l, x, y, w, h);
This page took 0.022748 seconds and 4 git commands to generate.