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.299 by sasha, Tue Jan 15 23:21:18 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);
516 resize_scrollbar (); /* create and map scrollbar */ 511 resize_scrollbar (); /* create and map scrollbar */
517#endif 512#endif
518#ifdef HAVE_BG_PIXMAP 513#ifdef HAVE_BG_PIXMAP
519 { 514 {
520 bgPixmap.set_target (this); 515 bgPixmap.set_target (this);
516 bgPixmap.invalidate ();
521 517
522#ifdef ENABLE_TRANSPARENCY 518#ifdef ENABLE_TRANSPARENCY
523 if (option (Opt_transparent)) 519 if (option (Opt_transparent))
524 { 520 {
525 bgPixmap.set_transparent (); 521 bgPixmap.set_transparent ();
586 } 582 }
587#endif 583#endif
588 584
589 XMapWindow (dpy, vt); 585 XMapWindow (dpy, vt);
590 XMapWindow (dpy, parent[0]); 586 XMapWindow (dpy, parent[0]);
587
588 refresh_check ();
591} 589}
592 590
593static struct sig_handlers 591static struct sig_handlers
594{ 592{
595 ev::sig sw_term, sw_int; 593 ev::sig sw_term, sw_int;
1696 unsigned char *prop = NULL; 1694 unsigned char *prop = NULL;
1697 int result = XGetWindowProperty (dpy, display->root, xa[prop_id], 1695 int result = XGetWindowProperty (dpy, display->root, xa[prop_id],
1698 0L, 1L, False, XA_PIXMAP, &atype, &aformat, 1696 0L, 1L, False, XA_PIXMAP, &atype, &aformat,
1699 &nitems, &bytes_after, &prop); 1697 &nitems, &bytes_after, &prop);
1700 if (result == Success && prop && atype == XA_PIXMAP) 1698 if (result == Success && prop && atype == XA_PIXMAP)
1701 {
1702 return *(Pixmap *)prop; 1699 return *(Pixmap *)prop;
1703 }
1704 } 1700 }
1701
1705 return None; 1702 return None;
1706} 1703}
1707 1704
1708#ifdef HAVE_BG_PIXMAP 1705#ifdef HAVE_BG_PIXMAP
1709# if TRACE_PIXMAPS 1706# if TRACE_PIXMAPS
1717# endif 1714# endif
1718 1715
1719void 1716void
1720rxvt_term::update_background () 1717rxvt_term::update_background ()
1721{ 1718{
1719 if (update_background_ev.is_active ())
1720 return;
1721
1722 bgPixmap.invalidate (); 1722 bgPixmap.invalidate ();
1723 1723
1724 /* no chance of real time refresh if we are blurring! */ 1724 ev_tstamp to_wait = 0.5 - (ev::now () - bgPixmap.valid_since);
1725 if (bgPixmap.invalid_since + 0.50 < ev::now () 1725
1726 && !(bgPixmap.flags & bgPixmap_t::blurNeeded)) 1726 if (to_wait <= 0.)
1727 {
1728 update_background_ev.stop ();
1729 bgPixmap.render (); 1727 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;
1741
1742 update_background_ev.start (refresh); 1729 update_background_ev.start (to_wait);
1743 }
1744} 1730}
1745 1731
1746void 1732void
1747rxvt_term::update_background_cb (ev::timer &w, int revents) 1733rxvt_term::update_background_cb (ev::timer &w, int revents)
1748{ 1734{
1749 make_current (); 1735 make_current ();
1736
1737 update_background_ev.stop ();
1750 bgPixmap.render (); 1738 bgPixmap.render ();
1751 refresh_check (); 1739 refresh_check ();
1752} 1740}
1753 1741
1754#endif /* HAVE_BG_PIXMAP */ 1742#endif /* HAVE_BG_PIXMAP */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines