… | |
… | |
238 | |
238 | |
239 | if ((init & SB_STYLE_NEXT) == 0) |
239 | if ((init & SB_STYLE_NEXT) == 0) |
240 | { |
240 | { |
241 | init |= SB_STYLE_NEXT; |
241 | init |= SB_STYLE_NEXT; |
242 | init_next (); |
242 | init_next (); |
|
|
243 | last_has_sb = false; |
243 | } |
244 | } |
244 | |
245 | |
245 | if (term->top_row == 0 || !update) |
246 | bool has_sb = term->top_row; |
|
|
247 | int stipple_height = height - SB_PADDING; |
|
|
248 | |
|
|
249 | if (has_sb) |
|
|
250 | stipple_height -= SB_BUTTON_TOTAL_HEIGHT; |
|
|
251 | else |
|
|
252 | stipple_height -= SB_PADDING; |
|
|
253 | |
|
|
254 | if (has_sb != last_has_sb || !update) |
246 | { |
255 | { |
|
|
256 | last_has_sb = has_sb; |
247 | XFillRectangle (term->dpy, win, grayGC, 0, 0, |
257 | XFillRectangle (term->dpy, win, grayGC, 0, 0, |
248 | SB_WIDTH_NEXT + 1, height); |
258 | SB_WIDTH_NEXT + 1, height); |
249 | XDrawRectangle (term->dpy, win, blackGC, 0, |
259 | XDrawRectangle (term->dpy, win, blackGC, 0, |
250 | -SB_BORDER_WIDTH, SB_WIDTH_NEXT, |
260 | -SB_BORDER_WIDTH, SB_WIDTH_NEXT, |
251 | height + SB_BORDER_WIDTH); |
261 | height + SB_BORDER_WIDTH); |
252 | XFillRectangle (term->dpy, win, stippleGC, |
262 | XFillRectangle (term->dpy, win, stippleGC, |
|
|
263 | SB_LEFT_PADDING, SB_PADDING, |
253 | SB_LEFT_PADDING, 0, SB_BUTTON_WIDTH, height); |
264 | SB_BUTTON_WIDTH, stipple_height); |
254 | } |
265 | } |
255 | |
266 | |
256 | if (term->top_row) |
267 | if (term->top_row) |
257 | { |
268 | { |
258 | if (last_top < top || !update) |
269 | if (last_top < top || !update) |