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.320 by root, Tue Nov 4 23:20:17 2008 UTC vs.
Revision 1.324 by root, Wed Nov 5 00:01:01 2008 UTC

159 159
160void 160void
161rxvt_term::scr_reset () 161rxvt_term::scr_reset ()
162{ 162{
163 scr_soft_reset (); 163 scr_soft_reset ();
164
164 view_start = 0; 165 view_start = 0;
165
166 num_scr = 0; 166 num_scr = 0;
167 167
168 if (ncol == 0) 168 if (ncol == 0)
169 ncol = 80; 169 ncol = 80;
170 170
1342 if (row >= nrow) /* Out Of Bounds */ 1342 if (row >= nrow) /* Out Of Bounds */
1343 return; 1343 return;
1344 1344
1345 min_it (num, nrow - row); 1345 min_it (num, nrow - row);
1346 1346
1347 /*TODO: the xlceararea/xfillrectangle below don't take scroll offste into account, ask mikachu for details */ 1347 // TODO: the code below does not work when view_start != 0
1348 // the workaround is to disable the clear and use a normal refresh
1349 // when view_start != 0. mysterious.
1348 if (rstyle & (RS_RVid | RS_Uline)) 1350 if (rstyle & (RS_RVid | RS_Uline))
1349 ren = (rend_t) ~RS_None; 1351 ren = (rend_t) ~RS_None;
1350 else if (GET_BASEBG (rstyle) == Color_bg) 1352 else if (GET_BASEBG (rstyle) == Color_bg)
1351 { 1353 {
1352 ren = DEFAULT_RSTYLE; 1354 ren = DEFAULT_RSTYLE;
1353 1355
1354 if (mapped) 1356 if (mapped && !view_start)
1355 XClearArea (dpy, vt, 0, 1357 XClearArea (dpy, vt, 0,
1356 Row2Pixel (row), (unsigned int)width, 1358 Row2Pixel (row - view_start), (unsigned int)width,
1357 (unsigned int)Height2Pixel (num), False); 1359 (unsigned int)Height2Pixel (num), False);
1358 } 1360 }
1359 else 1361 else
1360 { 1362 {
1361 ren = rstyle & (RS_fgMask | RS_bgMask); 1363 ren = rstyle & (RS_fgMask | RS_bgMask);
1362 1364
1365 if (mapped && !view_start)
1366 {
1363 gcvalue.foreground = pix_colors[bgcolor_of (rstyle)]; 1367 gcvalue.foreground = pix_colors[bgcolor_of (rstyle)];
1364 XChangeGC (dpy, gc, GCForeground, &gcvalue); 1368 XChangeGC (dpy, gc, GCForeground, &gcvalue);
1365 XFillRectangle (dpy, vt, gc, 1369 XFillRectangle (dpy, vt, gc,
1366 0, Row2Pixel (row), 1370 0, Row2Pixel (row - view_start),
1367 (unsigned int)width, 1371 (unsigned int)width,
1368 (unsigned int)Height2Pixel (num)); 1372 (unsigned int)Height2Pixel (num));
1369 gcvalue.foreground = pix_colors[Color_fg]; 1373 gcvalue.foreground = pix_colors[Color_fg];
1370 XChangeGC (dpy, gc, GCForeground, &gcvalue); 1374 XChangeGC (dpy, gc, GCForeground, &gcvalue);
1375 }
1371 } 1376 }
1372 1377
1373 for (; num--; row++) 1378 for (; num--; row++)
1374 { 1379 {
1375 scr_blank_screen_mem (ROW(row), rstyle); 1380 scr_blank_screen_mem (ROW(row), rstyle);
1381
1382 if (!view_start)
1376 scr_blank_line (drawn_buf [row], 0, ncol, ren); 1383 scr_blank_line (drawn_buf [row], 0, ncol, ren);
1377 } 1384 }
1378} 1385}
1379 1386
1380#if !ENABLE_MINIMAL 1387#if !ENABLE_MINIMAL
1381void 1388void

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines