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.300 by root, Sat Jan 19 00:24:53 2008 UTC

226 if (fontset[i] != fontset[0]) 226 if (fontset[i] != fontset[0])
227 delete fontset[i]; 227 delete fontset[i];
228#endif 228#endif
229 delete fontset[0]; 229 delete fontset[0];
230 230
231#ifdef HAVE_BG_PIXMAP
232 bgPixmap.destroy ();
233#endif
234
231 if (display) 235 if (display)
232 { 236 {
233 selection_clear (); 237 selection_clear ();
234 238
235#ifdef USE_XIM 239#ifdef USE_XIM
274 pix_colors_unfocused [i].free (this); 278 pix_colors_unfocused [i].free (this);
275#endif 279#endif
276 } 280 }
277 281
278 clear (); 282 clear ();
279 }
280 283
281 delete [] pix_colors_focused;
282#if OFF_FOCUS_FADING
283 delete [] pix_colors_unfocused;
284#endif
285
286#ifdef HAVE_BG_PIXMAP
287 bgPixmap.destroy ();
288#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);
286 }
291 287
292 scr_release (); 288 scr_release ();
293 289
294 /* clear all resources */ 290 /* clear all resources */
295 for (int i = 0; i < allocated.size (); i++) 291 for (int i = 0; i < allocated.size (); i++)
516 resize_scrollbar (); /* create and map scrollbar */ 512 resize_scrollbar (); /* create and map scrollbar */
517#endif 513#endif
518#ifdef HAVE_BG_PIXMAP 514#ifdef HAVE_BG_PIXMAP
519 { 515 {
520 bgPixmap.set_target (this); 516 bgPixmap.set_target (this);
517 bgPixmap.invalidate ();
521 518
522#ifdef ENABLE_TRANSPARENCY 519#ifdef ENABLE_TRANSPARENCY
523 if (option (Opt_transparent)) 520 if (option (Opt_transparent))
524 { 521 {
525 bgPixmap.set_transparent (); 522 bgPixmap.set_transparent ();
586 } 583 }
587#endif 584#endif
588 585
589 XMapWindow (dpy, vt); 586 XMapWindow (dpy, vt);
590 XMapWindow (dpy, parent[0]); 587 XMapWindow (dpy, parent[0]);
588
589 refresh_check ();
591} 590}
592 591
593static struct sig_handlers 592static struct sig_handlers
594{ 593{
595 ev::sig sw_term, sw_int; 594 ev::sig sw_term, sw_int;
1696 unsigned char *prop = NULL; 1695 unsigned char *prop = NULL;
1697 int result = XGetWindowProperty (dpy, display->root, xa[prop_id], 1696 int result = XGetWindowProperty (dpy, display->root, xa[prop_id],
1698 0L, 1L, False, XA_PIXMAP, &atype, &aformat, 1697 0L, 1L, False, XA_PIXMAP, &atype, &aformat,
1699 &nitems, &bytes_after, &prop); 1698 &nitems, &bytes_after, &prop);
1700 if (result == Success && prop && atype == XA_PIXMAP) 1699 if (result == Success && prop && atype == XA_PIXMAP)
1701 {
1702 return *(Pixmap *)prop; 1700 return *(Pixmap *)prop;
1703 }
1704 } 1701 }
1702
1705 return None; 1703 return None;
1706} 1704}
1707 1705
1708#ifdef HAVE_BG_PIXMAP 1706#ifdef HAVE_BG_PIXMAP
1709# if TRACE_PIXMAPS 1707# if TRACE_PIXMAPS
1717# endif 1715# endif
1718 1716
1719void 1717void
1720rxvt_term::update_background () 1718rxvt_term::update_background ()
1721{ 1719{
1720 if (update_background_ev.is_active ())
1721 return;
1722
1722 bgPixmap.invalidate (); 1723 bgPixmap.invalidate ();
1723 1724
1724 /* no chance of real time refresh if we are blurring! */ 1725 ev_tstamp to_wait = 0.5 - (ev::now () - bgPixmap.valid_since);
1725 if (bgPixmap.invalid_since + 0.50 < ev::now () 1726
1726 && !(bgPixmap.flags & bgPixmap_t::blurNeeded)) 1727 if (to_wait <= 0.)
1727 {
1728 update_background_ev.stop ();
1729 bgPixmap.render (); 1728 bgPixmap.render ();
1730 }
1731 else 1729 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); 1730 update_background_ev.start (to_wait);
1743 }
1744} 1731}
1745 1732
1746void 1733void
1747rxvt_term::update_background_cb (ev::timer &w, int revents) 1734rxvt_term::update_background_cb (ev::timer &w, int revents)
1748{ 1735{
1749 make_current (); 1736 make_current ();
1737
1738 update_background_ev.stop ();
1750 bgPixmap.render (); 1739 bgPixmap.render ();
1751 refresh_check (); 1740 refresh_check ();
1752} 1741}
1753 1742
1754#endif /* HAVE_BG_PIXMAP */ 1743#endif /* HAVE_BG_PIXMAP */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines