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.297 by sasha, Fri Jan 4 21:31: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
1724 /* no chance of real time refresh if we are blurring! */ 1721 ev_tstamp to_wait = 0.5 - (ev::now () - bgPixmap.valid_since);
1725 if (bgPixmap.invalid_since + 0.50 < ev::now () 1722
1726 && !(bgPixmap.flags & bgPixmap_t::blurNeeded)) 1723 if (to_wait <= 0.)
1727 {
1728 update_background_ev.stop ();
1729 bgPixmap.render (); 1724 bgPixmap.render ();
1730 }
1731 else 1725 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;
1741
1742 update_background_ev.start (refresh); 1726 update_background_ev.start (to_wait);
1743 }
1744} 1727}
1745 1728
1746void 1729void
1747rxvt_term::update_background_cb (ev::timer &w, int revents) 1730rxvt_term::update_background_cb (ev::timer &w, int revents)
1748{ 1731{
1749 make_current (); 1732 make_current ();
1733
1734 update_background_ev.stop ();
1750 bgPixmap.render (); 1735 bgPixmap.render ();
1751 refresh_check (); 1736 refresh_check ();
1752} 1737}
1753 1738
1754#endif /* HAVE_BG_PIXMAP */ 1739#endif /* HAVE_BG_PIXMAP */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines