--- rxvt-unicode/src/main.C 2007/12/14 06:29:28 1.284 +++ rxvt-unicode/src/main.C 2007/12/18 11:15:24 1.289 @@ -286,6 +286,7 @@ #ifdef HAVE_BG_PIXMAP bgPixmap.destroy (); #endif + display->flush (); /* ideally .put should do this */ displays.put (display); scr_release (); @@ -639,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. @@ -1714,7 +1679,7 @@ { Window cr; XTranslateCoordinates (dpy, parent[0], display->root, 0, 0, &x, &y, &cr); -/* fprintf( stderr, "origin is %+d%+d\n", x, y);*/ +/* fprintf (stderr, "origin is %+d%+d\n", x, y);*/ } Pixmap @@ -1758,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;