--- rxvt-unicode/src/rxvttoolkit.C 2012/06/03 15:50:22 1.132 +++ rxvt-unicode/src/rxvttoolkit.C 2012/06/04 15:18:52 1.134 @@ -68,7 +68,7 @@ "WM_LOCALE_NAME", "XIM_SERVERS", #endif -#ifdef ENABLE_TRANSPARENCY +#if ENABLE_TRANSPARENCY "_XROOTPMAP_ID", "ESETROOT_PMAP_ID", #endif @@ -155,7 +155,7 @@ ///////////////////////////////////////////////////////////////////////////// -#ifdef USE_XIM +#if USE_XIM static void #if XIMCB_PROTO_BROKEN @@ -536,14 +536,14 @@ #endif x_ev.stop (); flush_ev.stop (); -#ifdef USE_XIM +#if USE_XIM xims.clear (); #endif XrmDestroyDatabase (XrmGetDatabase (dpy)); XCloseDisplay (dpy); } -#ifdef USE_XIM +#if USE_XIM void rxvt_display::im_change_cb () { for (im_watcher **i = imw.begin (); i != imw.end (); ++i) @@ -589,7 +589,7 @@ XEvent xev; XNextEvent (dpy, &xev); -#ifdef USE_XIM +#if USE_XIM if (!XFilterEvent (&xev, None)) { if (xev.type == PropertyNotify @@ -607,7 +607,7 @@ else if (xw[i]->window == xev.xany.window) xw[i]->call (xev); } -#ifdef USE_XIM +#if USE_XIM } #endif } @@ -648,7 +648,7 @@ cur_owner = owner; } -#ifdef USE_XIM +#if USE_XIM void rxvt_display::reg (im_watcher *w) { @@ -693,6 +693,28 @@ return XInternAtom (dpy, name, False); } +Pixmap +rxvt_display::get_pixmap_property (Atom property) +{ + Pixmap pixmap = None; + + int aformat; + unsigned long nitems, bytes_after; + Atom atype; + unsigned char *prop; + int result = XGetWindowProperty (dpy, root, property, + 0L, 1L, False, XA_PIXMAP, &atype, &aformat, + &nitems, &bytes_after, &prop); + if (result == Success) + { + if (atype == XA_PIXMAP) + pixmap = *(Pixmap *)prop; + XFree (prop); + } + + return pixmap; +} + ///////////////////////////////////////////////////////////////////////////// template class refcache;