--- rxvt-unicode/src/rxvtimg.h 2012/06/03 16:55:31 1.5 +++ rxvt-unicode/src/rxvtimg.h 2012/06/03 20:34:25 1.7 @@ -15,19 +15,19 @@ Pixmap pm; int w, h; XRenderPictFormat *format; + bool shared; // true if we don't own it rxvt_img (rxvt_screen *screen, XRenderPictFormat *format, int width, int height); rxvt_img (rxvt_screen *screen, XRenderPictFormat *format, int width, int height, Pixmap pixmap); static rxvt_img *new_from_root (rxvt_screen *s); // get root pixmap - static rxvt_img *new_from_file (const char *filename); // from pixbuf + static rxvt_img *new_from_file (rxvt_screen *s, const char *filename); // from pixbuf ~rxvt_img (); Pixmap steal () { - Pixmap res = pm; - pm = 0; - return res; + shared = true; + return pm; } // inplace @@ -41,6 +41,7 @@ rxvt_img *copy (); rxvt_img *scale (int new_width, int new_height); rxvt_img *transform (int new_width, int new_height, double matrix[16]); + rxvt_img *convert_to (XRenderPictFormat *format); }; #endif