--- aterm/src/screen.c 2003-10-07 22:36:09.000000000 +0200 +++ aterm/src/screen.c 2003-10-18 01:13:50.000000000 +0200 @@ -45,6 +45,8 @@ #include #include /* get the typedef for CARD32 */ +XGCValues cur_fg_color; +XGCValues shadow_color; static screen_t screen; @@ -177,11 +179,11 @@ hx = (TermWin.width+TermWin_internalBorders+1)-x; if (y + hy > (TermWin.height+TermWin_internalBorder) - line_h) hy = (TermWin.height+TermWin_internalBorders+1)-y; - XClearArea(Xdisplay, drawBuffer, x, y, hx, hy, 0); + XClearArea(Xdisplay, drawBuffer, x, y, hx+1, hy, 0); #if defined(BACKGROUND_IMAGE) || defined(TRANSPARENT) if (TermWin.tintGC) { - XFillRectangle(Xdisplay, drawBuffer, TermWin.tintGC, x, y, hx, hy); + XFillRectangle(Xdisplay, drawBuffer, TermWin.tintGC, x, y, hx+1, hy); } #endif } @@ -230,7 +232,8 @@ rend_t setrstyle; D_SCREEN((stderr, "scr_reset()")); - + shadow_color.foreground = PixColors[Color_Black]; + TermWin.view_start = 0; RESET_CHSTAT; @@ -1964,6 +1967,11 @@ */ #define DRAW_STRING(Func, x, y, str, len) \ + XGetGCValues(Xdisplay, TermWin.gc, GCForeground, &cur_fg_color), \ + XChangeGC(Xdisplay, TermWin.gc, GCForeground, &shadow_color), \ + set_clipping((x), (y), (len)), \ + Func(Xdisplay, drawBuffer, TermWin.gc, (x)+1, (y)+1, (str), (len)), \ + XChangeGC(Xdisplay, TermWin.gc, GCForeground, &cur_fg_color), \ Func(Xdisplay, drawBuffer, TermWin.gc, (x), (y), (str), (len)) #if defined (NO_BRIGHTCOLOR) || defined (VERYBOLD) @@ -3440,3 +3448,20 @@ #endif fprintf(stderr, "%s\n", name[color]); } + +void +set_clipping(int x, int y, int len) +{ + unsigned char_w = Width2Pixel(1)-1; + register unsigned hx = (char_w+1)*len; + unsigned line_h = Height2Pixel(1)-1; + register unsigned hy = (line_h+1)*1; + + XRectangle rectangle; + rectangle.x = 0; + rectangle.y = 2; + rectangle.width = hx; + rectangle.height = hy; + + XSetClipRectangles(Xdisplay, TermWin.gc, x, y-hy, &rectangle, 1, Unsorted); +} --- aterm.cvs/src/screen.h 2001-03-11 08:50:05.000000000 +0100 +++ aterm/src/screen.h 2003-10-18 00:26:50.000000000 +0200 @@ -128,5 +128,7 @@ #define scr_clear() scr_clear_tint(1) +void set_clipping(int x, int y, int len); + #endif /* repeat inclusion protection */