ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/screen.C
(Generate patch)

Comparing rxvt-unicode/src/screen.C (file contents):
Revision 1.306 by root, Sun Jun 15 10:15:39 2008 UTC vs.
Revision 1.307 by root, Fri Jun 27 00:44:32 2008 UTC

83 ROW_AND_COL_IN_ROW_AT_OR_AFTER ((X).row, (X).col, (Y).row, (Y).col) 83 ROW_AND_COL_IN_ROW_AT_OR_AFTER ((X).row, (X).col, (Y).row, (Y).col)
84#define ROWCOL_IN_ROW_AT_OR_BEFORE(X, Y) \ 84#define ROWCOL_IN_ROW_AT_OR_BEFORE(X, Y) \
85 ROW_AND_COL_IN_ROW_AT_OR_BEFORE ((X).row, (X).col, (Y).row, (Y).col) 85 ROW_AND_COL_IN_ROW_AT_OR_BEFORE ((X).row, (X).col, (Y).row, (Y).col)
86 86
87/* 87/*
88 * CLEAR_ROWS : clear <num> rows starting from row <row>
89 * CLEAR_CHARS: clear <num> chars starting from pixel position <x,y> 88 * CLEAR_CHARS: clear <num> chars starting from pixel position <x,y>
90 * ERASE_ROWS : set <num> rows starting from row <row> to the foreground colour
91 */ 89 */
92#define CLEAR_ROWS(row, num) \
93 if (mapped) \
94 XClearArea (dpy, vt, 0, \
95 Row2Pixel (row), (unsigned int)width, \
96 (unsigned int)Height2Pixel (num), False)
97
98#define CLEAR_CHARS(x, y, num) \ 90#define CLEAR_CHARS(x, y, num) \
99 if (mapped) \ 91 if (mapped) \
100 XClearArea (dpy, vt, x, y, \ 92 XClearArea (dpy, vt, x, y, \
101 (unsigned int)Width2Pixel (num), \ 93 (unsigned int)Width2Pixel (num), \
102 (unsigned int)Height2Pixel (1), False) 94 (unsigned int)Height2Pixel (1), False)
103
104#define ERASE_ROWS(row, num) \
105 XFillRectangle (dpy, vt, gc, \
106 0, Row2Pixel (row), \
107 (unsigned int)width, \
108 (unsigned int)Height2Pixel (num))
109 95
110/* ------------------------------------------------------------------------- * 96/* ------------------------------------------------------------------------- *
111 * SCREEN `COMMON' ROUTINES * 97 * SCREEN `COMMON' ROUTINES *
112 * ------------------------------------------------------------------------- */ 98 * ------------------------------------------------------------------------- */
113 99
1336 if (row >= nrow) /* Out Of Bounds */ 1322 if (row >= nrow) /* Out Of Bounds */
1337 return; 1323 return;
1338 1324
1339 min_it (num, nrow - row); 1325 min_it (num, nrow - row);
1340 1326
1327 /*TODO: the xlceararea/xfillrectangle below don't take scroll offste into account, ask mikachu for details */
1341 if (rstyle & (RS_RVid | RS_Uline)) 1328 if (rstyle & (RS_RVid | RS_Uline))
1342 ren = (rend_t) ~RS_None; 1329 ren = (rend_t) ~RS_None;
1343 else if (GET_BASEBG (rstyle) == Color_bg) 1330 else if (GET_BASEBG (rstyle) == Color_bg)
1344 { 1331 {
1345 ren = DEFAULT_RSTYLE; 1332 ren = DEFAULT_RSTYLE;
1346 CLEAR_ROWS (row, num); 1333
1334 if (mapped)
1335 XClearArea (dpy, vt, 0,
1336 Row2Pixel (row), (unsigned int)width,
1337 (unsigned int)Height2Pixel (num), False);
1347 } 1338 }
1348 else 1339 else
1349 { 1340 {
1350 ren = rstyle & (RS_fgMask | RS_bgMask); 1341 ren = rstyle & (RS_fgMask | RS_bgMask);
1342
1351 gcvalue.foreground = pix_colors[bgcolor_of (rstyle)]; 1343 gcvalue.foreground = pix_colors[bgcolor_of (rstyle)];
1352 XChangeGC (dpy, gc, GCForeground, &gcvalue); 1344 XChangeGC (dpy, gc, GCForeground, &gcvalue);
1353 ERASE_ROWS (row, num); 1345 XFillRectangle (dpy, vt, gc,
1346 0, Row2Pixel (row),
1347 (unsigned int)width,
1348 (unsigned int)Height2Pixel (num));
1354 gcvalue.foreground = pix_colors[Color_fg]; 1349 gcvalue.foreground = pix_colors[Color_fg];
1355 XChangeGC (dpy, gc, GCForeground, &gcvalue); 1350 XChangeGC (dpy, gc, GCForeground, &gcvalue);
1356 } 1351 }
1357 1352
1358 for (; num--; row++) 1353 for (; num--; row++)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines