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.419 by root, Fri Jun 1 08:12:09 2012 UTC vs.
Revision 1.422 by root, Thu Jun 28 15:19:15 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 {
429} 429}
430 430
431void ecb_cold 431void ecb_cold
432rxvt_term::scr_release () NOTHROW 432rxvt_term::scr_release () NOTHROW
433{ 433{
434 free (chunk); chunk = 0; row_buf = 0; 434 chunk_free (chunk, chunk_size);
435 free (tabs); tabs = 0; 435 chunk = 0;
436 row_buf = 0;
437
438 free (tabs);
439 tabs = 0;
436} 440}
437 441
438/* ------------------------------------------------------------------------- */ 442/* ------------------------------------------------------------------------- */
439/* 443/*
440 * Hard/Soft reset 444 * Hard/Soft reset
1702 { 1706 {
1703 rvideo_state = on; 1707 rvideo_state = on;
1704 1708
1705 ::swap (pix_colors[Color_fg], pix_colors[Color_bg]); 1709 ::swap (pix_colors[Color_fg], pix_colors[Color_bg]);
1706#ifdef HAVE_BG_PIXMAP 1710#ifdef HAVE_BG_PIXMAP
1707 if (bg_pixmap == None) 1711 if (bg_img == 0)
1708#endif 1712#endif
1709 XSetWindowBackground (dpy, vt, pix_colors[Color_bg]); 1713 XSetWindowBackground (dpy, vt, pix_colors[Color_bg]);
1710 1714
1711 XGCValues gcvalue; 1715 XGCValues gcvalue;
1712 gcvalue.foreground = pix_colors[Color_fg]; 1716 gcvalue.foreground = pix_colors[Color_fg];
2047 refresh_count = 0; 2051 refresh_count = 0;
2048 2052
2049 unsigned int old_screen_flags = screen.flags; 2053 unsigned int old_screen_flags = screen.flags;
2050 bool have_bg = 0; 2054 bool have_bg = 0;
2051#ifdef HAVE_BG_PIXMAP 2055#ifdef HAVE_BG_PIXMAP
2052 have_bg = bg_pixmap != None; 2056 have_bg = bg_img != 0;
2053#endif 2057#endif
2054 ocrow = oldcursor.row; /* is there an old outline cursor on screen? */ 2058 ocrow = oldcursor.row; /* is there an old outline cursor on screen? */
2055 2059
2056 /* 2060 /*
2057 * B: reverse any characters which are selected 2061 * B: reverse any characters which are selected
2528rxvt_term::scr_recolour (bool refresh) NOTHROW 2532rxvt_term::scr_recolour (bool refresh) NOTHROW
2529{ 2533{
2530 bool transparent = false; 2534 bool transparent = false;
2531 2535
2532#ifdef HAVE_BG_PIXMAP 2536#ifdef HAVE_BG_PIXMAP
2533 if (bg_pixmap != None) 2537 if (bg_img != 0)
2534 { 2538 {
2535# ifdef ENABLE_TRANSPARENCY 2539# if ENABLE_TRANSPARENCY
2536 if (bg_flags & BG_IS_TRANSPARENT) 2540 if (bg_flags & BG_IS_TRANSPARENT)
2537 { 2541 {
2538 XSetWindowBackgroundPixmap (dpy, parent, bg_pixmap); 2542 XSetWindowBackgroundPixmap (dpy, parent, bg_img->pm);
2539 XSetWindowBackgroundPixmap (dpy, vt, ParentRelative); 2543 XSetWindowBackgroundPixmap (dpy, vt, ParentRelative);
2540 2544
2541 transparent = true; 2545 transparent = true;
2542 } 2546 }
2543 else 2547 else
2544# endif 2548# endif
2545 { 2549 {
2546 XSetWindowBackground (dpy, parent, pix_colors[Color_border]); 2550 XSetWindowBackground (dpy, parent, pix_colors[Color_border]);
2547 XSetWindowBackgroundPixmap (dpy, vt, bg_pixmap); 2551 XSetWindowBackgroundPixmap (dpy, vt, bg_img->pm);
2548 } 2552 }
2549 } 2553 }
2550 else 2554 else
2551#endif 2555#endif
2552 { 2556 {
3526 3530
3527 XSendEvent (dpy, rq.requestor, False, 0L, (XEvent *)&ev); 3531 XSendEvent (dpy, rq.requestor, False, 0L, (XEvent *)&ev);
3528} 3532}
3529 3533
3530/* ------------------------------------------------------------------------- */ 3534/* ------------------------------------------------------------------------- */
3531#ifdef USE_XIM 3535#if USE_XIM
3532void ecb_cold 3536void ecb_cold
3533rxvt_term::im_set_position (XPoint &pos) NOTHROW 3537rxvt_term::im_set_position (XPoint &pos) NOTHROW
3534{ 3538{
3535 XWindowAttributes xwa; 3539 XWindowAttributes xwa;
3536 3540

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines