… | |
… | |
75 | struct displaymatrix |
75 | struct displaymatrix |
76 | { |
76 | { |
77 | char *line; |
77 | char *line; |
78 | int len; |
78 | int len; |
79 | int buffer_size; |
79 | int buffer_size; |
|
|
80 | unsigned long color; |
80 | }; |
81 | }; |
81 | |
82 | |
82 | /* global variables */ |
83 | /* global variables */ |
83 | struct linematrix *lines; |
84 | struct linematrix *lines; |
84 | struct displaymatrix *display; |
85 | struct displaymatrix *display; |
… | |
… | |
404 | /* if this line is a different than it was, then it |
405 | /* if this line is a different than it was, then it |
405 | * needs displaying */ |
406 | * needs displaying */ |
406 | if (!opt_noflicker |
407 | if (!opt_noflicker |
407 | || refresh_all |
408 | || refresh_all |
408 | || display_line->len != line->len |
409 | || display_line->len != line->len |
|
|
410 | || display_line->color != line->color |
409 | || memcmp (display_line->line, line->line, line->len)) |
411 | || memcmp (display_line->line, line->line, line->len)) |
410 | { |
412 | { |
411 | /* don't bother updating the record of what has been |
413 | /* don't bother updating the record of what has been |
412 | * displayed if -noflicker isn't in effect, since we redraw |
414 | * displayed if -noflicker isn't in effect, since we redraw |
413 | * the whole display every time anyway */ |
415 | * the whole display every time anyway */ |
… | |
… | |
420 | display_line->buffer_size = line->len; |
422 | display_line->buffer_size = line->len; |
421 | display_line->line = xrealloc (display_line->line, display_line->buffer_size); |
423 | display_line->line = xrealloc (display_line->line, display_line->buffer_size); |
422 | } |
424 | } |
423 | |
425 | |
424 | display_line->len = line->len; |
426 | display_line->len = line->len; |
|
|
427 | display_line->color = line->color; |
425 | memcpy (display_line->line, line->line, line->len); |
428 | memcpy (display_line->line, line->line, line->len); |
426 | |
429 | |
427 | if (clear) |
430 | if (clear) |
428 | XClearArea (disp, root, win_x, win_y + offset - font_ascent, |
431 | XClearArea (disp, root, win_x, win_y + offset - font_ascent, |
429 | width + effect_x_space, font_height + effect_y_space, False); |
432 | width + effect_x_space, font_height + effect_y_space, False); |