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.318 by root, Tue Nov 4 22:44:09 2008 UTC vs.
Revision 1.324 by root, Wed Nov 5 00:01:01 2008 UTC

158 * ------------------------------------------------------------------------- */ 158 * ------------------------------------------------------------------------- */
159 159
160void 160void
161rxvt_term::scr_reset () 161rxvt_term::scr_reset ()
162{ 162{
163 scr_soft_reset ();
164
163 view_start = 0; 165 view_start = 0;
164 num_scr = 0; 166 num_scr = 0;
165 167
166 if (ncol == 0) 168 if (ncol == 0)
167 ncol = 80; 169 ncol = 80;
434void 436void
435rxvt_term::scr_poweron () 437rxvt_term::scr_poweron ()
436{ 438{
437 scr_release (); 439 scr_release ();
438 prev_nrow = prev_ncol = 0; 440 prev_nrow = prev_ncol = 0;
439 scr_soft_reset ();
440 scr_reset (); 441 scr_reset ();
441 442
442 scr_clear (true); 443 scr_clear (true);
443 scr_refresh (); 444 scr_refresh ();
444} 445}
459 free (tabs); 460 free (tabs);
460 tabs = (char *)rxvt_malloc (ncol); 461 tabs = (char *)rxvt_malloc (ncol);
461 462
462 for (int col = ncol; --col; ) 463 for (int col = ncol; --col; )
463 tabs [col] = col % TABSIZE == 0; 464 tabs [col] = col % TABSIZE == 0;
464
465 if (current_screen != PRIMARY)
466 scr_swap_screen ();
467 465
468 scr_scroll_region (0, MAX_ROWS - 1); 466 scr_scroll_region (0, MAX_ROWS - 1);
469 scr_rendition (0, ~RS_None); 467 scr_rendition (0, ~RS_None);
470 scr_insert_mode (0); 468 scr_insert_mode (0);
471} 469}
1344 if (row >= nrow) /* Out Of Bounds */ 1342 if (row >= nrow) /* Out Of Bounds */
1345 return; 1343 return;
1346 1344
1347 min_it (num, nrow - row); 1345 min_it (num, nrow - row);
1348 1346
1349 /*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.
1350 if (rstyle & (RS_RVid | RS_Uline)) 1350 if (rstyle & (RS_RVid | RS_Uline))
1351 ren = (rend_t) ~RS_None; 1351 ren = (rend_t) ~RS_None;
1352 else if (GET_BASEBG (rstyle) == Color_bg) 1352 else if (GET_BASEBG (rstyle) == Color_bg)
1353 { 1353 {
1354 ren = DEFAULT_RSTYLE; 1354 ren = DEFAULT_RSTYLE;
1355 1355
1356 if (mapped) 1356 if (mapped && !view_start)
1357 XClearArea (dpy, vt, 0, 1357 XClearArea (dpy, vt, 0,
1358 Row2Pixel (row), (unsigned int)width, 1358 Row2Pixel (row - view_start), (unsigned int)width,
1359 (unsigned int)Height2Pixel (num), False); 1359 (unsigned int)Height2Pixel (num), False);
1360 } 1360 }
1361 else 1361 else
1362 { 1362 {
1363 ren = rstyle & (RS_fgMask | RS_bgMask); 1363 ren = rstyle & (RS_fgMask | RS_bgMask);
1364 1364
1365 if (mapped && !view_start)
1366 {
1365 gcvalue.foreground = pix_colors[bgcolor_of (rstyle)]; 1367 gcvalue.foreground = pix_colors[bgcolor_of (rstyle)];
1366 XChangeGC (dpy, gc, GCForeground, &gcvalue); 1368 XChangeGC (dpy, gc, GCForeground, &gcvalue);
1367 XFillRectangle (dpy, vt, gc, 1369 XFillRectangle (dpy, vt, gc,
1368 0, Row2Pixel (row), 1370 0, Row2Pixel (row - view_start),
1369 (unsigned int)width, 1371 (unsigned int)width,
1370 (unsigned int)Height2Pixel (num)); 1372 (unsigned int)Height2Pixel (num));
1371 gcvalue.foreground = pix_colors[Color_fg]; 1373 gcvalue.foreground = pix_colors[Color_fg];
1372 XChangeGC (dpy, gc, GCForeground, &gcvalue); 1374 XChangeGC (dpy, gc, GCForeground, &gcvalue);
1375 }
1373 } 1376 }
1374 1377
1375 for (; num--; row++) 1378 for (; num--; row++)
1376 { 1379 {
1377 scr_blank_screen_mem (ROW(row), rstyle); 1380 scr_blank_screen_mem (ROW(row), rstyle);
1381
1382 if (!view_start)
1378 scr_blank_line (drawn_buf [row], 0, ncol, ren); 1383 scr_blank_line (drawn_buf [row], 0, ncol, ren);
1379 } 1384 }
1380} 1385}
1381 1386
1382#if !ENABLE_MINIMAL 1387#if !ENABLE_MINIMAL
1383void 1388void

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines