--- rxvt-unicode/src/main.C 2007/12/14 02:10:33 1.281 +++ rxvt-unicode/src/main.C 2007/12/18 01:36:24 1.288 @@ -13,7 +13,7 @@ * Copyright (c) 1997,1998 Oezguer Kesim * Copyright (c) 1998-2001 Geoff Wing * - extensive modifications - * Copyright (c) 2003-2006 Marc Lehmann + * Copyright (c) 2003-2007 Marc Lehmann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -187,7 +187,6 @@ bell_ev.set (this); #endif child_ev.set (this); - prepare_ev.set (this); flush_ev.set (this); destroy_ev.set (this); pty_ev.set (this); @@ -287,6 +286,7 @@ #ifdef HAVE_BG_PIXMAP bgPixmap.destroy (); #endif + display->flush (); /* ideally .put should do this */ displays.put (display); scr_release (); @@ -354,7 +354,7 @@ vt_ev.stop (display); } - prepare_ev.stop (); + flush_ev.stop (); pty_ev.stop (); #ifdef CURSOR_BLINK cursor_blink_ev.stop (); @@ -572,8 +572,6 @@ if (pty->pty >= 0) pty_ev.start (pty->pty, ev::READ); - prepare_ev.start (); - HOOK_INVOKE ((this, HOOK_START, DT_END)); #if ENABLE_XEMBED @@ -642,42 +640,6 @@ XrmInitialize (); } -/* ------------------------------------------------------------------------- * - * MEMORY ALLOCATION WRAPPERS * - * ------------------------------------------------------------------------- */ -void * -rxvt_malloc (size_t size) -{ - void *p = malloc (size); - - if (!p) - rxvt_fatal ("memory allocation failure. aborting.\n"); - - return p; -} - -void * -rxvt_calloc (size_t number, size_t size) -{ - void *p = calloc (number, size); - - if (!p) - rxvt_fatal ("memory allocation failure. aborting.\n"); - - return p; -} - -void * -rxvt_realloc (void *ptr, size_t size) -{ - void *p = realloc (ptr, size); - - if (!p) - rxvt_fatal ("memory allocation failure. aborting.\n"); - - return p; -} - /*----------------------------------------------------------------------*/ /* * window size/position calculations for XSizeHint and other storage. @@ -1761,14 +1723,16 @@ bgPixmap.render (); else { + ev_tstamp refresh; update_background_ev.stop (); - if (!bgPixmap.need_client_side_rendering()) - update_background_ev.start (.05); + if (!bgPixmap.need_client_side_rendering ()) + refresh = .05; else if (bgPixmap.flags & bgPixmap_t::blurNeeded) - update_background_ev.start (.20); /* very slow !!! */ + refresh = .20; /* very slow !!! */ else - update_background_ev.start (.07); + refresh = .07; + update_background_ev.start (refresh); } return 0; @@ -1777,7 +1741,9 @@ void rxvt_term::update_background_cb (ev::timer &w, int revents) { + make_current (); bgPixmap.render (); + refresh_check (); } #endif /* HAVE_BG_PIXMAP */