… | |
… | |
691 | Atom rxvt_display::atom (const char *name) |
691 | Atom rxvt_display::atom (const char *name) |
692 | { |
692 | { |
693 | return XInternAtom (dpy, name, False); |
693 | return XInternAtom (dpy, name, False); |
694 | } |
694 | } |
695 | |
695 | |
|
|
696 | Pixmap |
|
|
697 | rxvt_display::get_pixmap_property (Atom property) |
|
|
698 | { |
|
|
699 | Pixmap pixmap = None; |
|
|
700 | |
|
|
701 | int aformat; |
|
|
702 | unsigned long nitems, bytes_after; |
|
|
703 | Atom atype; |
|
|
704 | unsigned char *prop; |
|
|
705 | int result = XGetWindowProperty (dpy, root, property, |
|
|
706 | 0L, 1L, False, XA_PIXMAP, &atype, &aformat, |
|
|
707 | &nitems, &bytes_after, &prop); |
|
|
708 | if (result == Success) |
|
|
709 | { |
|
|
710 | if (atype == XA_PIXMAP) |
|
|
711 | pixmap = *(Pixmap *)prop; |
|
|
712 | XFree (prop); |
|
|
713 | } |
|
|
714 | |
|
|
715 | return pixmap; |
|
|
716 | } |
|
|
717 | |
696 | ///////////////////////////////////////////////////////////////////////////// |
718 | ///////////////////////////////////////////////////////////////////////////// |
697 | |
719 | |
698 | template class refcache<rxvt_display>; |
720 | template class refcache<rxvt_display>; |
699 | refcache<rxvt_display> displays; |
721 | refcache<rxvt_display> displays; |
700 | |
722 | |