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.421 by sf-exg, Sun Jun 10 13:07:56 2012 UTC vs.
Revision 1.427 by sf-exg, Sat Dec 29 15:59:51 2012 UTC

169 tsize -= tsize % sizeof (rend_t); 169 tsize -= tsize % sizeof (rend_t);
170 170
171 int all_rows = total_rows + nrow + nrow; 171 int all_rows = total_rows + nrow + nrow;
172 172
173 chunk_size = (sizeof (line_t) + rsize + tsize) * all_rows; 173 chunk_size = (sizeof (line_t) + rsize + tsize) * all_rows;
174 chunk = rxvt_malloc (chunk_size); 174 chunk = chunk_alloc (chunk_size, 0);
175 175
176 char *base = (char *)chunk + sizeof (line_t) * all_rows; 176 char *base = (char *)chunk + sizeof (line_t) * all_rows;
177 177
178 for (int row = 0; row < all_rows; ++row) 178 for (int row = 0; row < all_rows; ++row)
179 { 179 {
225 225
226 screen.tscroll = 0; 226 screen.tscroll = 0;
227 screen.bscroll = nrow - 1; 227 screen.bscroll = nrow - 1;
228 228
229 void *prev_chunk = chunk; 229 void *prev_chunk = chunk;
230 size_t prev_chunk_size = chunk_size;
230 line_t *prev_drawn_buf = drawn_buf; 231 line_t *prev_drawn_buf = drawn_buf;
231 line_t *prev_swap_buf = swap_buf; 232 line_t *prev_swap_buf = swap_buf;
232 line_t *prev_row_buf = row_buf; 233 line_t *prev_row_buf = row_buf;
233 234
234 int common_col = min (prev_ncol, ncol); 235 int common_col = min (prev_ncol, ncol);
408 if (!ROW (row).valid ()) scr_blank_screen_mem (ROW (row), DEFAULT_RSTYLE); 409 if (!ROW (row).valid ()) scr_blank_screen_mem (ROW (row), DEFAULT_RSTYLE);
409 if (!swap_buf [row].valid ()) scr_blank_screen_mem (swap_buf [row], DEFAULT_RSTYLE); 410 if (!swap_buf [row].valid ()) scr_blank_screen_mem (swap_buf [row], DEFAULT_RSTYLE);
410 if (!drawn_buf [row].valid ()) scr_blank_screen_mem (drawn_buf [row], DEFAULT_RSTYLE); 411 if (!drawn_buf [row].valid ()) scr_blank_screen_mem (drawn_buf [row], DEFAULT_RSTYLE);
411 } 412 }
412 413
413 free (prev_chunk); 414 chunk_free (prev_chunk, prev_chunk_size);
414 415
415 free (tabs); 416 free (tabs);
416 tabs = (char *)rxvt_malloc (ncol); 417 tabs = (char *)rxvt_malloc (ncol);
417 418
418 for (int col = ncol; col--; ) 419 for (int col = ncol; col--; )
429} 430}
430 431
431void ecb_cold 432void ecb_cold
432rxvt_term::scr_release () NOTHROW 433rxvt_term::scr_release () NOTHROW
433{ 434{
434 free (chunk); chunk = 0; row_buf = 0; 435 chunk_free (chunk, chunk_size);
435 free (tabs); tabs = 0; 436 chunk = 0;
437 row_buf = 0;
438
439 free (tabs);
440 tabs = 0;
436} 441}
437 442
438/* ------------------------------------------------------------------------- */ 443/* ------------------------------------------------------------------------- */
439/* 444/*
440 * Hard/Soft reset 445 * Hard/Soft reset
1701 if (rvideo_state != on) 1706 if (rvideo_state != on)
1702 { 1707 {
1703 rvideo_state = on; 1708 rvideo_state = on;
1704 1709
1705 ::swap (pix_colors[Color_fg], pix_colors[Color_bg]); 1710 ::swap (pix_colors[Color_fg], pix_colors[Color_bg]);
1706#ifdef HAVE_BG_PIXMAP 1711#ifdef HAVE_IMG
1707 if (bg_img == 0) 1712 if (bg_img == 0)
1708#endif 1713#endif
1709 XSetWindowBackground (dpy, vt, pix_colors[Color_bg]); 1714 XSetWindowBackground (dpy, vt, pix_colors[Color_bg]);
1710 1715
1711 XGCValues gcvalue; 1716 XGCValues gcvalue;
2046 */ 2051 */
2047 refresh_count = 0; 2052 refresh_count = 0;
2048 2053
2049 unsigned int old_screen_flags = screen.flags; 2054 unsigned int old_screen_flags = screen.flags;
2050 bool have_bg = 0; 2055 bool have_bg = 0;
2051#ifdef HAVE_BG_PIXMAP 2056#ifdef HAVE_IMG
2052 have_bg = bg_img != 0; 2057 have_bg = bg_img != 0;
2053#endif 2058#endif
2054 ocrow = oldcursor.row; /* is there an old outline cursor on screen? */ 2059 ocrow = oldcursor.row; /* is there an old outline cursor on screen? */
2055 2060
2056 /* 2061 /*
2527void ecb_cold 2532void ecb_cold
2528rxvt_term::scr_recolour (bool refresh) NOTHROW 2533rxvt_term::scr_recolour (bool refresh) NOTHROW
2529{ 2534{
2530 bool transparent = false; 2535 bool transparent = false;
2531 2536
2532#ifdef HAVE_BG_PIXMAP 2537#ifdef HAVE_IMG
2533 if (bg_img != 0) 2538 if (bg_img != 0)
2534 { 2539 {
2535# if ENABLE_TRANSPARENCY 2540# if ENABLE_TRANSPARENCY
2536 if (bg_flags & BG_IS_TRANSPARENT) 2541 if (bg_flags & BG_IS_TRANSPARENT)
2537 { 2542 {
2559 if (scrollBar.win) 2564 if (scrollBar.win)
2560 { 2565 {
2561 if (transparent) 2566 if (transparent)
2562 XSetWindowBackgroundPixmap (dpy, scrollBar.win, ParentRelative); 2567 XSetWindowBackgroundPixmap (dpy, scrollBar.win, ParentRelative);
2563 else 2568 else
2564 XSetWindowBackground (dpy, scrollBar.win, pix_colors[Color_border]); 2569 XSetWindowBackground (dpy, scrollBar.win, pix_colors[scrollBar.color ()]);
2565 scrollBar.state = SB_STATE_IDLE; 2570 scrollBar.state = SB_STATE_IDLE;
2566 scrollBar.show (0); 2571 scrollBar.show (0);
2567 } 2572 }
2568 2573
2569 if (refresh) 2574 if (refresh)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines