--- rxvt-unicode/src/screen.C 2012/06/01 08:12:09 1.419 +++ rxvt-unicode/src/screen.C 2012/06/28 15:19:15 1.422 @@ -171,7 +171,7 @@ int all_rows = total_rows + nrow + nrow; chunk_size = (sizeof (line_t) + rsize + tsize) * all_rows; - chunk = rxvt_malloc (chunk_size); + chunk = chunk_alloc (chunk_size, 0); char *base = (char *)chunk + sizeof (line_t) * all_rows; @@ -431,8 +431,12 @@ void ecb_cold rxvt_term::scr_release () NOTHROW { - free (chunk); chunk = 0; row_buf = 0; - free (tabs); tabs = 0; + chunk_free (chunk, chunk_size); + chunk = 0; + row_buf = 0; + + free (tabs); + tabs = 0; } /* ------------------------------------------------------------------------- */ @@ -1704,7 +1708,7 @@ ::swap (pix_colors[Color_fg], pix_colors[Color_bg]); #ifdef HAVE_BG_PIXMAP - if (bg_pixmap == None) + if (bg_img == 0) #endif XSetWindowBackground (dpy, vt, pix_colors[Color_bg]); @@ -2049,7 +2053,7 @@ unsigned int old_screen_flags = screen.flags; bool have_bg = 0; #ifdef HAVE_BG_PIXMAP - have_bg = bg_pixmap != None; + have_bg = bg_img != 0; #endif ocrow = oldcursor.row; /* is there an old outline cursor on screen? */ @@ -2530,12 +2534,12 @@ bool transparent = false; #ifdef HAVE_BG_PIXMAP - if (bg_pixmap != None) + if (bg_img != 0) { -# ifdef ENABLE_TRANSPARENCY +# if ENABLE_TRANSPARENCY if (bg_flags & BG_IS_TRANSPARENT) { - XSetWindowBackgroundPixmap (dpy, parent, bg_pixmap); + XSetWindowBackgroundPixmap (dpy, parent, bg_img->pm); XSetWindowBackgroundPixmap (dpy, vt, ParentRelative); transparent = true; @@ -2544,7 +2548,7 @@ # endif { XSetWindowBackground (dpy, parent, pix_colors[Color_border]); - XSetWindowBackgroundPixmap (dpy, vt, bg_pixmap); + XSetWindowBackgroundPixmap (dpy, vt, bg_img->pm); } } else @@ -3528,7 +3532,7 @@ } /* ------------------------------------------------------------------------- */ -#ifdef USE_XIM +#if USE_XIM void ecb_cold rxvt_term::im_set_position (XPoint &pos) NOTHROW {