ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/scrollbar-rxvt.C
(Generate patch)

Comparing rxvt-unicode/src/scrollbar-rxvt.C (file contents):
Revision 1.13 by root, Sun Aug 15 22:09:24 2004 UTC vs.
Revision 1.16 by root, Mon Aug 23 19:57:33 2004 UTC

121 pt[2].x, pt[2].y, pt[1].x, pt[1].y); 121 pt[2].x, pt[2].y, pt[1].x, pt[1].y);
122#endif 122#endif
123} 123}
124 124
125int 125int
126rxvt_term::scrollbar_show_rxvt (int update __attribute__ ((unused)), int last_top, int last_bot, int scrollbar_len) 126rxvt_term::scrollbar_show_rxvt (int update, int last_top, int last_bot, int scrollbar_len)
127{ 127{
128 int sbshadow = sb_shadow; 128 int sbshadow = sb_shadow;
129 int sbwidth = (int)scrollBar.width; 129 int sbwidth = (int)scrollBar.width;
130 130
131 if ((scrollBar.init & R_SB_RXVT) == 0) 131 if ((scrollBar.init & R_SB_RXVT) == 0)
132 { 132 {
133 scrollBar.init |= R_SB_RXVT; 133 scrollBar.init |= R_SB_RXVT;
134 if (sbshadow) 134 if (sbshadow)
135 { 135 {
136 XSetWindowBackground (display->display, scrollBar.win, pix_colors[Color_trough]); 136 XSetWindowBackground (display->display, scrollBar.win, pix_colors_focused[Color_trough]);
137 XClearWindow (display->display, scrollBar.win); 137 XClearWindow (display->display, scrollBar.win);
138 } 138 }
139 } 139 }
140 else 140 else
141 { 141 {
142 /* instead of XClearWindow (display->display, scrollBar.win); */ 142 if (update)
143 {
143 if (last_top < scrollBar.top) 144 if (last_top < scrollBar.top)
144 XClearArea (display->display, scrollBar.win, 145 XClearArea (display->display, scrollBar.win,
145 sbshadow, last_top, 146 sbshadow, last_top,
146 sbwidth, (scrollBar.top - last_top), 147 sbwidth, (scrollBar.top - last_top),
147 False); 148 False);
148 149
149 if (scrollBar.bot < last_bot) 150 if (scrollBar.bot < last_bot)
150 XClearArea (display->display, scrollBar.win, 151 XClearArea (display->display, scrollBar.win,
151 sbshadow, scrollBar.bot, 152 sbshadow, scrollBar.bot,
152 sbwidth, (last_bot - scrollBar.bot), 153 sbwidth, (last_bot - scrollBar.bot),
153 False); 154 False);
155 }
156 else
157 XClearWindow (display->display, scrollBar.win);
154 } 158 }
155 159
156 /* scrollbar slider */ 160 /* scrollbar slider */
157#ifdef SB_BORDER 161#ifdef SB_BORDER
158 { 162 {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines