Add a function that allocates a pixmap and checks success
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
4
src/x.c
4
src/x.c
@ -193,11 +193,9 @@ x_create_picture(session_t *ps, int wid, int hei,
|
||||
|
||||
int depth = pictfmt->depth;
|
||||
|
||||
xcb_connection_t *c = XGetXCBConnection(ps->dpy);
|
||||
Pixmap tmp_pixmap = xcb_generate_id(c);
|
||||
Pixmap tmp_pixmap = create_pixmap(ps, depth, ps->root, wid, hei);
|
||||
if (!tmp_pixmap)
|
||||
return None;
|
||||
xcb_create_pixmap(c, depth, tmp_pixmap, ps->root, wid, hei);
|
||||
|
||||
xcb_render_picture_t picture =
|
||||
x_create_picture_with_pictfmt_and_pixmap(ps, pictfmt, tmp_pixmap, valuemask, attr);
|
||||
|
Reference in New Issue
Block a user