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.291 by root, Mon Dec 24 06:51:37 2007 UTC vs.
Revision 1.294 by root, Fri Jan 4 19:12:23 2008 UTC

276 } 276 }
277 277
278 clear (); 278 clear ();
279 } 279 }
280 280
281 delete [] pix_colors_focused;
282#if OFF_FOCUS_FADING
283 delete [] pix_colors_unfocused;
284#endif
285
286#ifdef HAVE_BG_PIXMAP 281#ifdef HAVE_BG_PIXMAP
287 bgPixmap.destroy (); 282 bgPixmap.destroy ();
288#endif 283#endif
289 display->flush (); /* ideally .put should do this */ 284 display->flush (); /* ideally .put should do this */
290 displays.put (display); 285 displays.put (display);
1696 unsigned char *prop = NULL; 1691 unsigned char *prop = NULL;
1697 int result = XGetWindowProperty (dpy, display->root, xa[prop_id], 1692 int result = XGetWindowProperty (dpy, display->root, xa[prop_id],
1698 0L, 1L, False, XA_PIXMAP, &atype, &aformat, 1693 0L, 1L, False, XA_PIXMAP, &atype, &aformat,
1699 &nitems, &bytes_after, &prop); 1694 &nitems, &bytes_after, &prop);
1700 if (result == Success && prop && atype == XA_PIXMAP) 1695 if (result == Success && prop && atype == XA_PIXMAP)
1701 {
1702 return *(Pixmap *)prop; 1696 return *(Pixmap *)prop;
1703 }
1704 } 1697 }
1698
1705 return None; 1699 return None;
1706} 1700}
1707 1701
1708#ifdef HAVE_BG_PIXMAP 1702#ifdef HAVE_BG_PIXMAP
1709# if TRACE_PIXMAPS 1703# if TRACE_PIXMAPS
1717# endif 1711# endif
1718 1712
1719void 1713void
1720rxvt_term::update_background () 1714rxvt_term::update_background ()
1721{ 1715{
1716 if (update_background_ev.is_active ())
1717 return;
1718
1722 bgPixmap.invalidate (); 1719 bgPixmap.invalidate ();
1723 1720
1721 ev_tstamp refresh;
1722
1723 if (!bgPixmap.need_client_side_rendering ())
1724 refresh = .05;
1725 else if (bgPixmap.flags & bgPixmap_t::blurNeeded)
1724 /* no chance of real time refresh if we are blurring! */ 1726 /* no chance of real time refresh if we are blurring! */
1725 if (bgPixmap.invalid_since + 0.50 < ev::now () 1727 refresh = .50;
1726 && !(bgPixmap.flags & bgPixmap_t::blurNeeded))
1727 {
1728 update_background_ev.stop ();
1729 bgPixmap.render ();
1730 }
1731 else 1728 else
1732 {
1733 ev_tstamp refresh;
1734
1735 if (!bgPixmap.need_client_side_rendering ())
1736 refresh = .05;
1737 else if (bgPixmap.flags & bgPixmap_t::blurNeeded)
1738 refresh = .20; /* very slow !!! */
1739 else
1740 refresh = .07; 1729 refresh = .07;
1741 1730
1742 update_background_ev.start (refresh); 1731 update_background_ev.start (refresh);
1743 }
1744} 1732}
1745 1733
1746void 1734void
1747rxvt_term::update_background_cb (ev::timer &w, int revents) 1735rxvt_term::update_background_cb (ev::timer &w, int revents)
1748{ 1736{
1749 make_current (); 1737 make_current ();
1738
1739 update_background_ev.stop ();
1750 bgPixmap.render (); 1740 bgPixmap.render ();
1751 refresh_check (); 1741 refresh_check ();
1752} 1742}
1753 1743
1754#endif /* HAVE_BG_PIXMAP */ 1744#endif /* HAVE_BG_PIXMAP */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines