]> Dogcows Code - chaz/openbox/blobdiff - render/render.c
api cleanups for render/theme.h
[chaz/openbox] / render / render.c
index 2cfb70c766a2082f0e1fa2ebe7488782a30fb2e6..c1ed1e114a127c6e813bff67b81f7baab9e8a705 100644 (file)
@@ -109,7 +109,9 @@ void RrPaint(RrAppearance *a, Window win, gint w, gint h)
         case RR_TEXTURE_RGBA:
             g_assert(!transferred);
             RrImageDraw(a->surface.pixel_data,
-                        &a->texture[i].data.rgba, &tarea);
+                        &a->texture[i].data.rgba,
+                        a->w, a->h,
+                        &tarea);
         break;
         }
     }
@@ -203,7 +205,6 @@ RrAppearance *RrAppearanceCopy(RrAppearance *orig)
                              orig->textures * sizeof(RrTexture));
     for (i = 0; i < copy->textures; ++i)
         if (copy->texture[i].type == RR_TEXTURE_RGBA) {
-            g_free(copy->texture[i].data.rgba.cache);
             copy->texture[i].data.rgba.cache = NULL;
         }
     copy->pixmap = None;
@@ -360,8 +361,10 @@ gboolean RrPixmapToRGBA(const RrInstance *inst,
     if (mask) {
         xm = XGetImage(RrDisplay(inst), mask,
                        0, 0, mw, mh, 0xffffffff, ZPixmap);
-        if (!xm)
+        if (!xm) {
+            XDestroyImage(xi);
             return FALSE;
+        }
     }
 
     *data = g_new(RrPixel32, pw * ph);
@@ -382,5 +385,9 @@ gboolean RrPixmapToRGBA(const RrInstance *inst,
     *w = pw;
     *h = ph;
 
+    XDestroyImage(xi);
+    if (mask)
+        XDestroyImage(xm);
+
     return TRUE;
 }
This page took 0.020883 seconds and 4 git commands to generate.