--- rxvt-unicode/src/rxvtimg.h 2012/06/03 16:54:04 1.4 +++ rxvt-unicode/src/rxvtimg.h 2012/06/03 18:14:13 1.6 @@ -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); - rxvt_img (rxvt_screen *screen); // get root pixmap - rxvt_img (const char *filename); // from pixbuf + static rxvt_img *new_from_root (rxvt_screen *s); // get root pixmap + 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