Local history: Render window background fill.

This commit is contained in:
Michael Drake 2017-06-09 21:48:53 +01:00
parent ebab4ee8d6
commit 3b18d36b02

View File

@ -785,9 +785,15 @@ bool browser_window_history_redraw(struct browser_window *bw,
const struct redraw_context *ctx)
{
struct history *history;
struct rect rect = {
.x0 = 0,
.y0 = 0,
};
assert(bw != NULL);
history = bw->history;
rect.x1 = history->width;
rect.y1 = history->height;
if (history == NULL) {
LOG("Attempt to draw NULL history.");
@ -797,6 +803,8 @@ bool browser_window_history_redraw(struct browser_window *bw,
if (!history->start)
return true;
ctx->plot->rectangle(ctx, &pstyle_bg, &rect);
return browser_window_history__redraw_entry(history, history->start,
0, 0, 0, 0, 0, 0, false, ctx);
}
@ -808,6 +816,12 @@ bool browser_window_history_redraw_rectangle(struct browser_window *bw,
int x, int y, const struct redraw_context *ctx)
{
struct history *history;
struct rect rect = {
.x0 = x0,
.y0 = y0,
.x1 = x1,
.y1 = y1,
};
assert(bw != NULL);
history = bw->history;
@ -815,6 +829,8 @@ bool browser_window_history_redraw_rectangle(struct browser_window *bw,
if (!history->start)
return true;
ctx->plot->rectangle(ctx, &pstyle_bg, &rect);
return browser_window_history__redraw_entry(history, history->start,
x0, y0, x1, y1, x, y, true, ctx);
}