--- rxvt-unicode/src/rxvttoolkit.C 2012/06/03 15:50:22 1.132 +++ rxvt-unicode/src/rxvttoolkit.C 2012/06/06 20:22:04 1.136 @@ -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 @@ -475,6 +475,9 @@ { flags |= DISPLAY_HAS_RENDER; + if (major > 0 || (major == 0 && minor >= 10)) + flags |= DISPLAY_HAS_RENDER_10; + if (major > 0 || (major == 0 && minor >= 11)) flags |= DISPLAY_HAS_RENDER_MUL; @@ -536,14 +539,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 +592,7 @@ XEvent xev; XNextEvent (dpy, &xev); -#ifdef USE_XIM +#if USE_XIM if (!XFilterEvent (&xev, None)) { if (xev.type == PropertyNotify @@ -607,7 +610,7 @@ else if (xw[i]->window == xev.xany.window) xw[i]->call (xev); } -#ifdef USE_XIM +#if USE_XIM } #endif } @@ -648,7 +651,7 @@ cur_owner = owner; } -#ifdef USE_XIM +#if USE_XIM void rxvt_display::reg (im_watcher *w) { @@ -693,6 +696,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; @@ -867,7 +892,7 @@ } void -rxvt_color::get (rgba &color) +rxvt_color::get (rgba &color) const { #if XFT color.r = c.color.red; @@ -883,7 +908,7 @@ } void -rxvt_color::get (XColor &color) +rxvt_color::get (XColor &color) const { rgba c; get (c);