From 3b18d36b025c8b2a36644391393258034dd9c702 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Fri, 9 Jun 2017 21:48:53 +0100 Subject: Local history: Render window background fill. --- desktop/browser_history.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/desktop/browser_history.c b/desktop/browser_history.c index cf70c4700..606a8c62c 100644 --- a/desktop/browser_history.c +++ b/desktop/browser_history.c @@ -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); } -- cgit v1.2.3