]> Dogcows Code - chaz/openbox/blobdiff - render/render.c
invisible resizing areas/grips in the top corners of the window
[chaz/openbox] / render / render.c
index 1d5b705c57aad901c32b28e7eb80454536931303..7be3993e1cda2e6188a88e60ef2280d2fce2c911 100644 (file)
@@ -23,7 +23,7 @@ void RrPaint(RrAppearance *l, Window win, gint w, gint h)
     int i, transferred = 0, sw;
     RrPixel32 *source, *dest;
     Pixmap oldp;
-    Rect tarea; /* area in which to draw textures */
+    RrRect tarea; /* area in which to draw textures */
     gboolean resized;
 
     if (w <= 0 || h <= 0) return;
@@ -45,21 +45,21 @@ void RrPaint(RrAppearance *l, Window win, gint w, gint h)
                                RrVisual(l->inst), RrColormap(l->inst));
     g_assert(l->xftdraw != NULL);
 
-    g_free(l->surface.RrPixel_data);
-    l->surface.RrPixel_data = g_new(RrPixel32, w * h);
+    g_free(l->surface.pixel_data);
+    l->surface.pixel_data = g_new(RrPixel32, w * h);
 
     if (l->surface.grad == RR_SURFACE_PARENTREL) {
         g_assert (l->surface.parent);
         g_assert (l->surface.parent->w);
 
         sw = l->surface.parent->w;
-        source = (l->surface.parent->surface.RrPixel_data +
+        source = (l->surface.parent->surface.pixel_data +
                   l->surface.parentx + sw * l->surface.parenty);
-        dest = l->surface.RrPixel_data;
+        dest = l->surface.pixel_data;
         for (i = 0; i < h; i++, source += sw, dest += w) {
             memcpy(dest, source, w * sizeof(RrPixel32));
         }
-    }else
+    } else
         RrRender(l, w, h);
 
     RECT_SET(tarea, 0, 0, w, h);
@@ -109,7 +109,7 @@ void RrPaint(RrAppearance *l, Window win, gint w, gint h)
             RrPixmapMaskDraw(l->pixmap, &l->texture[i].data.mask, &tarea);
         break;
         case RR_TEXTURE_RGBA:
-            RrImageDraw(l->surface.RrPixel_data,
+            RrImageDraw(l->surface.pixel_data,
                         &l->texture[i].data.rgba, &tarea);
         break;
         }
@@ -188,7 +188,9 @@ RrAppearance *RrAppearanceCopy(RrAppearance *orig)
 
     spc->interlaced = spo->interlaced;
     spc->border = spo->border;
-    spc->RrPixel_data = NULL;
+    spc->parent = NULL;
+    spc->parentx = spc->parenty = 0;
+    spc->pixel_data = NULL;
 
     copy->textures = orig->textures;
     copy->texture = g_memdup(orig->texture,
@@ -213,7 +215,7 @@ void RrAppearanceFree(RrAppearance *a)
         RrColorFree(p->border_color);
         RrColorFree(p->bevel_dark);
         RrColorFree(p->bevel_light);
-        g_free(p->RrPixel_data);
+        g_free(p->pixel_data);
 
         g_free(a);
     }
@@ -229,10 +231,10 @@ static void RrPixel32_to_pixmap(RrAppearance *l, gint x, gint y, gint w, gint h)
                       ZPixmap, 0, NULL, w, h, 32, 0);
     g_assert(im != NULL);
 
-    in = l->surface.RrPixel_data;
+    in = l->surface.pixel_data;
     out = l->pixmap;
 
-    im->byte_order = RrEndian;
+    im->byte_order = LSBFirst;
 /* this malloc is a complete waste of time on normal 32bpp
    as reduce_depth just sets im->data = data and returns
 */
@@ -263,13 +265,9 @@ void RrMinsize(RrAppearance *l, gint *w, gint *h)
             break;
         case RR_TEXTURE_TEXT:
             m = RrFontMeasureString(l->texture[i].data.text.font,
-                                    l->texture[i].data.text.string,
-                                    l->texture[i].data.text.shadow,
-                                    l->texture[i].data.text.offset);
+                                    l->texture[i].data.text.string);
             *w = MAX(*w, m);
-            m = RrFontHeight(l->texture[i].data.text.font,
-                             l->texture[i].data.text.shadow,
-                             l->texture[i].data.text.offset);
+            m = RrFontHeight(l->texture[i].data.text.font);
             *h += MAX(*h, m);
             break;
         case RR_TEXTURE_RGBA:
This page took 0.024895 seconds and 4 git commands to generate.