summaryrefslogtreecommitdiff
path: root/surface.c
diff options
context:
space:
mode:
Diffstat (limited to 'surface.c')
-rw-r--r--surface.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/surface.c b/surface.c
index aee4771..6f071c1 100644
--- a/surface.c
+++ b/surface.c
@@ -4,12 +4,13 @@
#include <stdio.h>
XRenderSurf *
-xrender_surf_new(Display *disp, Drawable draw, int format, int w, int h)
+xrender_surf_new(Display *disp, Drawable draw, int format, int w, int h, Bool ca)
{
XRenderSurf *rs;
XRenderPictFormat *fmt;
- XRenderPictureAttributes att;
-
+ XRenderPictureAttributes att = {
+ .component_alpha = ca,
+ };
Visual *vis = DefaultVisual(disp, DefaultScreen(disp));
@@ -22,7 +23,7 @@ xrender_surf_new(Display *disp, Drawable draw, int format, int w, int h)
rs->vis = vis;
rs->draw = XCreatePixmap(disp, draw, w, h, fmt->depth);
rs->pic = XRenderCreatePicture(disp, rs->draw, fmt,
- 0, &att);
+ CPComponentAlpha, &att);
rs->allocated = 1;
return rs;
}