diff options
Diffstat (limited to 'surface.c')
-rw-r--r-- | surface.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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; } |