diff options
author | David Reveman <davidr@novell.com> | 2006-11-28 14:35:06 -0500 |
---|---|---|
committer | David Reveman <davidr@novell.com> | 2006-11-28 14:35:06 -0500 |
commit | 2d764529b88692ff8cb7f3e2bfa838500bc4c3a3 (patch) | |
tree | 2b6b13f17c5f41cf03740ae34424d0fce1d54cdf /libdecoration/decoration.c | |
parent | 1f301b54f404a58b93846ea237a2620662428d3e (diff) |
Expose decor_shadow_t struct and add pixmap to this struct.
Diffstat (limited to 'libdecoration/decoration.c')
-rw-r--r-- | libdecoration/decoration.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/libdecoration/decoration.c b/libdecoration/decoration.c index 135aefe9..664f451b 100644 --- a/libdecoration/decoration.c +++ b/libdecoration/decoration.c @@ -28,12 +28,6 @@ #define MAX(a, b) ((a) > (b) ? (a) : (b)) -struct _decor_shadow { - Picture picture; - int width; - int height; -}; - /* decoration property ------------------- @@ -714,6 +708,7 @@ decor_create_shadow (Display *xdisplay, if (!shadow) return NULL; + shadow->pixmap = 0; shadow->picture = 0; shadow->width = 0; shadow->height = 0; @@ -865,8 +860,8 @@ decor_create_shadow (Display *xdisplay, XRenderFreePicture (xdisplay, src); XFreePixmap (xdisplay, pixmap); - XFreePixmap (xdisplay, d_pixmap); + shadow->pixmap = d_pixmap; shadow->picture = dst; shadow->width = d_width; shadow->height = d_height; @@ -883,5 +878,8 @@ decor_destroy_shadow (Display *xdisplay, if (shadow->picture) XRenderFreePicture (xdisplay, shadow->picture); + if (shadow->pixmap) + XFreePixmap (xdisplay, shadow->pixmap); + free (shadow); } |