… | |
… | |
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 | |
125 | int |
125 | int |
126 | rxvt_term::scrollbar_show_rxvt (int update __attribute__ ((unused)), int last_top, int last_bot, int scrollbar_len) |
126 | rxvt_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 | { |