From 8ab6ab8125ec4d1562f1b2eb6fbc848d3f0f7ce0 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 23 Jan 2008 06:49:30 +0000 Subject: [PATCH] *** empty log message *** --- src/rxvtfont.C | 9 ++++++--- src/screen.C | 20 +++++++++----------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/rxvtfont.C b/src/rxvtfont.C index 67f3f305..2c6742eb 100644 --- a/src/rxvtfont.C +++ b/src/rxvtfont.C @@ -239,10 +239,12 @@ rxvt_font::clear_rect (rxvt_drawable &d, int x, int y, int w, int h, int color) { #if XFT bool done = false; -#ifdef HAVE_BG_PIXMAP - if (term->bgPixmap.pixmap && color >= 0 && term->pix_colors[color].c.color.alpha < 0x0ff00) + +# ifdef HAVE_BG_PIXMAP + if (term->bgPixmap.pixmap && color >= 0 && !term->pix_colors[color].is_opaque ()) { Picture dst = XftDrawPicture (d); + if (dst != 0) { XClearArea (disp, d, x, y, w, h, false); @@ -251,9 +253,10 @@ rxvt_font::clear_rect (rxvt_drawable &d, int x, int y, int w, int h, int color) done = true; } } -#endif +# endif if (!done) XftDrawRect (d, &term->pix_colors[color].c, x, y, w, h); + #else XSetForeground (disp, gc, term->pix_colors[color]); XFillRectangle (disp, d, gc, x, y, w, h); diff --git a/src/screen.C b/src/screen.C index cb4ff517..554e05b2 100644 --- a/src/screen.C +++ b/src/screen.C @@ -89,24 +89,22 @@ static inline void fill_text (text_t *start, text_t value, int len) * 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)) /* ------------------------------------------------------------------------- * @@ -2377,7 +2375,7 @@ rxvt_term::scr_refresh () NOTHROW #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 @@ rxvt_term::scr_refresh () NOTHROW #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), -- 2.34.1