--- rxvt-unicode/src/screen.C 2008/01/20 14:12:39 1.298 +++ rxvt-unicode/src/screen.C 2008/02/21 10:30:24 1.305 @@ -89,24 +89,22 @@ * CLEAR_CHARS: clear chars starting from pixel position * ERASE_ROWS : set rows starting from row to the foreground colour */ -#define drawBuffer vt - #define CLEAR_ROWS(row, num) \ - if (mapped) \ - XClearArea (dpy, drawBuffer, 0, \ - Row2Pixel (row), (unsigned int)width, \ + if (mapped) \ + XClearArea (dpy, vt, 0, \ + Row2Pixel (row), (unsigned int)width, \ (unsigned int)Height2Pixel (num), False) #define CLEAR_CHARS(x, y, num) \ - if (mapped) \ - XClearArea (dpy, drawBuffer, x, y, \ + if (mapped) \ + XClearArea (dpy, vt, x, y, \ (unsigned int)Width2Pixel (num), \ (unsigned int)Height2Pixel (1), False) #define ERASE_ROWS(row, num) \ - XFillRectangle (dpy, drawBuffer, gc, \ + XFillRectangle (dpy, vt, gc, \ 0, Row2Pixel (row), \ - (unsigned int)width, \ + (unsigned int)width, \ (unsigned int)Height2Pixel (num)) /* ------------------------------------------------------------------------- * @@ -1996,11 +1994,11 @@ /* * A: set up vars */ - have_bg = 0; refresh_count = 0; + have_bg = 0; #ifdef HAVE_BG_PIXMAP - have_bg |= bgPixmap.pixmap != None; + have_bg = bgPixmap.pixmap != None; #endif ocrow = oldcursor.row; /* is there an old outline cursor on screen? */ @@ -2377,7 +2375,7 @@ #endif XSetForeground (dpy, gc, pix_colors[fore]); - XDrawLine (dpy, drawBuffer, gc, + XDrawLine (dpy, vt, gc, xpixel, ypixel + font->ascent + 1, xpixel + Width2Pixel (count) - 1, ypixel + font->ascent + 1); } @@ -2425,7 +2423,7 @@ #endif XSetForeground (dpy, gc, pix_colors[ccol1]); - XDrawRectangle (dpy, drawBuffer, gc, + XDrawRectangle (dpy, vt, gc, Col2Pixel (col), Row2Pixel (oldcursor.row), (unsigned int) (Width2Pixel (cursorwidth) - 1), @@ -2478,20 +2476,19 @@ XClearWindow (dpy, parent[0]); XSetWindowBackground (dpy, vt, pix_colors[Color_bg]); -# if HAVE_SCROLLBARS if (scrollBar.win) { XSetWindowBackground (dpy, scrollBar.win, pix_colors[Color_border]); - scrollBar.setIdle (); - scrollbar_show (0); + scrollBar.state = STATE_IDLE; + scrollBar.show (0); } -# endif +#endif + + /* bgPixmap.apply () does not do the following : */ scr_clear (); scr_touch (true); want_refresh = 1; - -#endif } /* ------------------------------------------------------------------------- */ @@ -2590,7 +2587,7 @@ unsigned int width, towrite; char r1[] = "\n"; - for (row = saveLines - nsaved; + for (row = saveLines + top_row; row < saveLines + nrow - 1; row++) { width = row_buf[row].l >= 0 ? row_buf[row].l