Convert usage of XCreatePixmap to xcb

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter
2018-09-29 12:00:18 +02:00
parent ea9942b87e
commit 529306e65f
3 changed files with 21 additions and 20 deletions

View File

@@ -35,18 +35,15 @@ xrc_clear_xid(void);
// Pixmap
static inline Pixmap
XCreatePixmap_(Display *dpy, Drawable drawable,
unsigned int width, unsigned int height, unsigned int depth,
M_POS_DATA_PARAMS) {
Pixmap ret = XCreatePixmap(dpy, drawable, width, height, depth);
if (ret)
xrc_add_xid_(ret, "Pixmap", M_POS_DATA_PASSTHROUGH);
return ret;
static inline void
xcb_create_pixmap_(xcb_connection_t *c, uint8_t depth, xcb_pixmap_t pixmap,
xcb_drawable_t drawable, uint16_t width, uint16_t height, M_POS_DATA_PARAMS) {
xcb_create_pixmap(c, depth, pixmap, drawable, width, height);
xrc_add_xid_(pixmap, "Pixmap", M_POS_DATA_PASSTHROUGH);
}
#define XCreatePixmap(dpy, drawable, width, height, depth) \
XCreatePixmap_(dpy, drawable, width, height, depth, M_POS_DATA)
#define xcb_create_pixmap(c, depth, pixmap, drawable, width, height) \
xcb_create_pixmap_(c, depth, pixmap, drawable, width, height, M_POS_DATA)
static inline xcb_pixmap_t
xcb_composite_name_window_pixmap_(xcb_connection_t *c, xcb_window_t window, xcb_pixmap_t pixmap, M_POS_DATA_PARAMS) {