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.297 by root, Wed Jan 9 01:14:29 2008 UTC vs.
Revision 1.300 by ayin, Sun Jan 27 22:48:33 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 * ------------------------------------------------------------------------- */
2375 XSetForeground (dpy, gc, pix_colors[Color_underline]); 2373 XSetForeground (dpy, gc, pix_colors[Color_underline]);
2376 else 2374 else
2377#endif 2375#endif
2378 XSetForeground (dpy, gc, pix_colors[fore]); 2376 XSetForeground (dpy, gc, pix_colors[fore]);
2379 2377
2380 XDrawLine (dpy, drawBuffer, gc, 2378 XDrawLine (dpy, vt, gc,
2381 xpixel, ypixel + font->ascent + 1, 2379 xpixel, ypixel + font->ascent + 1,
2382 xpixel + Width2Pixel (count) - 1, ypixel + font->ascent + 1); 2380 xpixel + Width2Pixel (count) - 1, ypixel + font->ascent + 1);
2383 } 2381 }
2384 } /* for (col....) */ 2382 } /* for (col....) */
2385 } /* for (row....) */ 2383 } /* for (row....) */
2423 XSetForeground (dpy, gc, pix_colors[Color_cursor]); 2421 XSetForeground (dpy, gc, pix_colors[Color_cursor]);
2424 else 2422 else
2425#endif 2423#endif
2426 XSetForeground (dpy, gc, pix_colors[ccol1]); 2424 XSetForeground (dpy, gc, pix_colors[ccol1]);
2427 2425
2428 XDrawRectangle (dpy, drawBuffer, gc, 2426 XDrawRectangle (dpy, vt, gc,
2429 Col2Pixel (col), 2427 Col2Pixel (col),
2430 Row2Pixel (oldcursor.row), 2428 Row2Pixel (oldcursor.row),
2431 (unsigned int) (Width2Pixel (cursorwidth) - 1), 2429 (unsigned int) (Width2Pixel (cursorwidth) - 1),
2432 (unsigned int) (Height2Pixel (1) - lineSpace - 1)); 2430 (unsigned int) (Height2Pixel (1) - lineSpace - 1));
2433 } 2431 }
2476 2474
2477 XSetWindowBackground (dpy, parent[0], pix_colors[Color_border]); 2475 XSetWindowBackground (dpy, parent[0], pix_colors[Color_border]);
2478 XClearWindow (dpy, parent[0]); 2476 XClearWindow (dpy, parent[0]);
2479 XSetWindowBackground (dpy, vt, pix_colors[Color_bg]); 2477 XSetWindowBackground (dpy, vt, pix_colors[Color_bg]);
2480 2478
2481# if HAVE_SCROLLBARS
2482 if (scrollBar.win) 2479 if (scrollBar.win)
2483 { 2480 {
2484 XSetWindowBackground (dpy, scrollBar.win, pix_colors[Color_border]); 2481 XSetWindowBackground (dpy, scrollBar.win, pix_colors[Color_border]);
2485 scrollBar.setIdle (); 2482 scrollBar.setIdle ();
2486 scrollbar_show (0); 2483 scrollbar_show (0);
2487 } 2484 }
2488# endif
2489 2485
2490 scr_clear (); 2486 scr_clear ();
2491 scr_touch (true); 2487 scr_touch (true);
2492 want_refresh = 1; 2488 want_refresh = 1;
2493 2489
2649 /* convert normal newline chars into common keyboard Return key sequence */ 2645 /* convert normal newline chars into common keyboard Return key sequence */
2650 for (unsigned int i = 0; i < len; i++) 2646 for (unsigned int i = 0; i < len; i++)
2651 if (data[i] == C0_LF) 2647 if (data[i] == C0_LF)
2652 data[i] = C0_CR; 2648 data[i] = C0_CR;
2653 2649
2650 if (priv_modes & PrivMode_BracketPaste)
2651 tt_printf ("\e[200~");
2652
2654 tt_write (data, len); 2653 tt_write (data, len);
2654
2655 if (priv_modes & PrivMode_BracketPaste)
2656 tt_printf ("\e[201~");
2655} 2657}
2656 2658
2657/* ------------------------------------------------------------------------- */ 2659/* ------------------------------------------------------------------------- */
2658/* 2660/*
2659 * Respond to a notification that a primary selection has been sent 2661 * Respond to a notification that a primary selection has been sent

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines