ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/main.C
(Generate patch)

Comparing rxvt-unicode/src/main.C (file contents):
Revision 1.248 by sasha, Wed Sep 12 19:51:41 2007 UTC vs.
Revision 1.249 by sasha, Wed Sep 12 20:29:24 2007 UTC

1700 1700
1701 XFree (preedit_attr); 1701 XFree (preedit_attr);
1702} 1702}
1703#endif /* USE_XIM */ 1703#endif /* USE_XIM */
1704 1704
1705void
1706rxvt_term::get_window_origin (int &x, int &y)
1707{
1708 Window cr;
1709 XTranslateCoordinates (dpy, parent[0], display->root, 0, 0, &x, &y, &cr);
1710/* fprintf( stderr, "origin is %+d%+d\n", x, y);*/
1711}
1712
1713Pixmap
1714rxvt_term::get_pixmap_property (int prop_id)
1715{
1716 if (prop_id > 0 && prop_id < NUM_XA)
1717 if (xa[prop_id])
1718 {
1719 int aformat;
1720 unsigned long nitems, bytes_after;
1721 Atom atype;
1722 unsigned char *prop = NULL;
1723 int result = XGetWindowProperty (dpy, display->root, xa[prop_id],
1724 0L, 1L, False, XA_PIXMAP, &atype, &aformat,
1725 &nitems, &bytes_after, &prop);
1726 if (result == Success && prop && atype == XA_PIXMAP)
1727 {
1728 return *(Pixmap *)prop;
1729 }
1730 }
1731 return None;
1732}
1733
1734#ifdef HAVE_BG_PIXMAP
1735int
1736rxvt_term::update_background ()
1737{
1738 bgPixmap.invalidate();
1739
1740 /* no chance of real time refresh if we are blurring ! */
1741 if (bgPixmap.invalid_since + 0.5 < NOW && !(bgPixmap.flags & bgPixmap_t::blurNeeded))
1742 bgPixmap.render();
1743 else
1744 {
1745 update_background_ev.stop ();
1746 if (!bgPixmap.need_client_side_rendering())
1747 update_background_ev.start (NOW + .05);
1748 else if (bgPixmap.flags & bgPixmap_t::blurNeeded)
1749 update_background_ev.start (NOW + .2); /* very slow !!! */
1750 else
1751 update_background_ev.start (NOW + .07);
1752 }
1753 return 0;
1754}
1755
1756void
1757rxvt_term::update_background_cb (time_watcher &w)
1758{
1759 bgPixmap.render ();
1760}
1761
1762#endif /* HAVE_BG_PIXMAP */
1763
1705/*----------------------- end-of-file (C source) -----------------------*/ 1764/*----------------------- end-of-file (C source) -----------------------*/

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines