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.290 by root, Fri Dec 14 05:52:34 2007 UTC vs.
Revision 1.303 by ayin, Sat Feb 16 13:35:45 2008 UTC

87/* 87/*
88 * CLEAR_ROWS : clear <num> rows starting from row <row> 88 * CLEAR_ROWS : clear <num> rows starting from row <row>
89 * CLEAR_CHARS: clear <num> chars starting from pixel position <x,y> 89 * 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 90 * ERASE_ROWS : set <num> rows starting from row <row> to the foreground colour
91 */ 91 */
92#define drawBuffer vt
93
94#define CLEAR_ROWS(row, num) \ 92#define CLEAR_ROWS(row, num) \
95 if (mapped) \ 93 if (mapped) \
96 XClearArea (dpy, drawBuffer, 0, \ 94 XClearArea (dpy, vt, 0, \
97 Row2Pixel (row), (unsigned int)width, \ 95 Row2Pixel (row), (unsigned int)width, \
98 (unsigned int)Height2Pixel (num), False) 96 (unsigned int)Height2Pixel (num), False)
99 97
100#define CLEAR_CHARS(x, y, num) \ 98#define CLEAR_CHARS(x, y, num) \
101 if (mapped) \ 99 if (mapped) \
102 XClearArea (dpy, drawBuffer, x, y, \ 100 XClearArea (dpy, vt, x, y, \
103 (unsigned int)Width2Pixel (num), \ 101 (unsigned int)Width2Pixel (num), \
104 (unsigned int)Height2Pixel (1), False) 102 (unsigned int)Height2Pixel (1), False)
105 103
106#define ERASE_ROWS(row, num) \ 104#define ERASE_ROWS(row, num) \
107 XFillRectangle (dpy, drawBuffer, gc, \ 105 XFillRectangle (dpy, vt, gc, \
108 0, Row2Pixel (row), \ 106 0, Row2Pixel (row), \
109 (unsigned int)width, \ 107 (unsigned int)width, \
110 (unsigned int)Height2Pixel (num)) 108 (unsigned int)Height2Pixel (num))
111 109
112/* ------------------------------------------------------------------------- * 110/* ------------------------------------------------------------------------- *
113 * SCREEN `COMMON' ROUTINES * 111 * SCREEN `COMMON' ROUTINES *
114 * ------------------------------------------------------------------------- */ 112 * ------------------------------------------------------------------------- */
1011 * XTERM_SEQ: CTRL-H 1009 * XTERM_SEQ: CTRL-H
1012 */ 1010 */
1013void 1011void
1014rxvt_term::scr_backspace () NOTHROW 1012rxvt_term::scr_backspace () NOTHROW
1015{ 1013{
1016 want_refresh = 1;
1017
1018 if (screen.cur.col == 0) 1014 if (screen.cur.col == 0)
1019 { 1015 {
1020 if (screen.cur.row > 0) 1016 if (screen.cur.row > 0)
1021 { 1017 {
1022#ifdef TERMCAP_HAS_BW 1018#ifdef TERMCAP_HAS_BW
1023 screen.cur.col = ncol - 1; 1019 screen.cur.col = ncol - 1;
1024 screen.cur.row--; 1020 --screen.cur.row;
1025 return; 1021
1022 want_refresh = 1;
1026#endif 1023#endif
1027 } 1024 }
1028 } 1025 }
1029 else if (!(screen.flags & Screen_WrapNext)) 1026 else
1030 scr_gotorc (0, -1, RELATIVE); 1027 scr_gotorc (0, -1, RELATIVE);
1031
1032 screen.flags &= ~Screen_WrapNext;
1033} 1028}
1034 1029
1035/* ------------------------------------------------------------------------- */ 1030/* ------------------------------------------------------------------------- */
1036/* 1031/*
1037 * Process Horizontal Tab 1032 * Process Horizontal Tab
1872void 1867void
1873rxvt_term::bell_cb (ev::timer &w, int revents) 1868rxvt_term::bell_cb (ev::timer &w, int revents)
1874{ 1869{
1875 rvideo_bell = false; 1870 rvideo_bell = false;
1876 scr_rvideo_mode (rvideo_mode); 1871 scr_rvideo_mode (rvideo_mode);
1872 refresh_check ();
1877} 1873}
1878#endif 1874#endif
1879 1875
1880/* ------------------------------------------------------------------------- */ 1876/* ------------------------------------------------------------------------- */
1881void 1877void
1996 return; 1992 return;
1997 1993
1998 /* 1994 /*
1999 * A: set up vars 1995 * A: set up vars
2000 */ 1996 */
1997 refresh_count = 0;
1998
2001 have_bg = 0; 1999 have_bg = 0;
2002 refresh_count = 0;
2003
2004#ifdef HAVE_BG_PIXMAP 2000#ifdef HAVE_BG_PIXMAP
2005 have_bg |= bgPixmap.pixmap != None; 2001 have_bg = bgPixmap.pixmap != None;
2006#endif 2002#endif
2007 ocrow = oldcursor.row; /* is there an old outline cursor on screen? */ 2003 ocrow = oldcursor.row; /* is there an old outline cursor on screen? */
2008 2004
2009 /* 2005 /*
2010 * B: reverse any characters which are selected 2006 * B: reverse any characters which are selected
2377 XSetForeground (dpy, gc, pix_colors[Color_underline]); 2373 XSetForeground (dpy, gc, pix_colors[Color_underline]);
2378 else 2374 else
2379#endif 2375#endif
2380 XSetForeground (dpy, gc, pix_colors[fore]); 2376 XSetForeground (dpy, gc, pix_colors[fore]);
2381 2377
2382 XDrawLine (dpy, drawBuffer, gc, 2378 XDrawLine (dpy, vt, gc,
2383 xpixel, ypixel + font->ascent + 1, 2379 xpixel, ypixel + font->ascent + 1,
2384 xpixel + Width2Pixel (count) - 1, ypixel + font->ascent + 1); 2380 xpixel + Width2Pixel (count) - 1, ypixel + font->ascent + 1);
2385 } 2381 }
2386 } /* for (col....) */ 2382 } /* for (col....) */
2387 } /* for (row....) */ 2383 } /* for (row....) */
2425 XSetForeground (dpy, gc, pix_colors[Color_cursor]); 2421 XSetForeground (dpy, gc, pix_colors[Color_cursor]);
2426 else 2422 else
2427#endif 2423#endif
2428 XSetForeground (dpy, gc, pix_colors[ccol1]); 2424 XSetForeground (dpy, gc, pix_colors[ccol1]);
2429 2425
2430 XDrawRectangle (dpy, drawBuffer, gc, 2426 XDrawRectangle (dpy, vt, gc,
2431 Col2Pixel (col), 2427 Col2Pixel (col),
2432 Row2Pixel (oldcursor.row), 2428 Row2Pixel (oldcursor.row),
2433 (unsigned int) (Width2Pixel (cursorwidth) - 1), 2429 (unsigned int) (Width2Pixel (cursorwidth) - 1),
2434 (unsigned int) (Height2Pixel (1) - lineSpace - 1)); 2430 (unsigned int) (Height2Pixel (1) - lineSpace - 1));
2435 } 2431 }
2478 2474
2479 XSetWindowBackground (dpy, parent[0], pix_colors[Color_border]); 2475 XSetWindowBackground (dpy, parent[0], pix_colors[Color_border]);
2480 XClearWindow (dpy, parent[0]); 2476 XClearWindow (dpy, parent[0]);
2481 XSetWindowBackground (dpy, vt, pix_colors[Color_bg]); 2477 XSetWindowBackground (dpy, vt, pix_colors[Color_bg]);
2482 2478
2483# if HAVE_SCROLLBARS
2484 if (scrollBar.win) 2479 if (scrollBar.win)
2485 { 2480 {
2486 XSetWindowBackground (dpy, scrollBar.win, pix_colors[Color_border]); 2481 XSetWindowBackground (dpy, scrollBar.win, pix_colors[Color_border]);
2487 scrollBar.setIdle (); 2482 scrollBar.state = STATE_IDLE;
2488 scrollbar_show (0); 2483 scrollbar_show (0);
2489 } 2484 }
2485
2490# endif 2486#endif
2491 2487
2488 /* bgPixmap.apply () does not do the following : */
2492 scr_clear (); 2489 scr_clear ();
2493 scr_touch (true); 2490 scr_touch (true);
2494 want_refresh = 1; 2491 want_refresh = 1;
2495
2496#endif
2497} 2492}
2498 2493
2499/* ------------------------------------------------------------------------- */ 2494/* ------------------------------------------------------------------------- */
2500void 2495void
2501rxvt_term::scr_clear (bool really) NOTHROW 2496rxvt_term::scr_clear (bool really) NOTHROW
2651 /* convert normal newline chars into common keyboard Return key sequence */ 2646 /* convert normal newline chars into common keyboard Return key sequence */
2652 for (unsigned int i = 0; i < len; i++) 2647 for (unsigned int i = 0; i < len; i++)
2653 if (data[i] == C0_LF) 2648 if (data[i] == C0_LF)
2654 data[i] = C0_CR; 2649 data[i] = C0_CR;
2655 2650
2651 if (priv_modes & PrivMode_BracketPaste)
2652 tt_printf ("\e[200~");
2653
2656 tt_write (data, len); 2654 tt_write (data, len);
2655
2656 if (priv_modes & PrivMode_BracketPaste)
2657 tt_printf ("\e[201~");
2657} 2658}
2658 2659
2659/* ------------------------------------------------------------------------- */ 2660/* ------------------------------------------------------------------------- */
2660/* 2661/*
2661 * Respond to a notification that a primary selection has been sent 2662 * Respond to a notification that a primary selection has been sent

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines