]> Dogcows Code - chaz/openbox/blobdiff - render/gradient.c
keep all transient windows above their parents
[chaz/openbox] / render / gradient.c
index b65cf0ec9e7623f347a5796211741e06edc7cc9b..ad9154a681e5a433cfc36e7e0f360d71c6472e42 100644 (file)
@@ -233,12 +233,21 @@ void highlight(pixel32 *x, pixel32 *y, gboolean raised)
 
 void gradient_solid(Appearance *l, int x, int y, int w, int h) 
 {
-  int i;
+  pixel32 pix;
+  int i, a, b;
   PlanarSurface *sp = &l->surface.data.planar;
   int left = x, top = y, right = w - 1, bottom = h - 1;
 
   if (sp->primary->gc == None)
     color_allocate_gc(sp->primary);
+  pix = (sp->primary->r << default_red_shift)
+      + (sp->primary->g << default_green_shift)
+      + (sp->primary->b << default_blue_shift);
+
+  for (a = 0; a < l->area.width; a++)
+    for (b = 0; b < l->area.height; b++)
+      sp->pixel_data[a + b*l->area.width] = pix;
+
   XFillRectangle(ob_display, l->pixmap, sp->primary->gc
                  , x, y, w, h);
 
This page took 0.01981 seconds and 4 git commands to generate.