From 368b03bffb8dcf2dc2a306f29756ca882b3fee51 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sat, 10 Jun 2017 11:15:20 +0100 Subject: Local history: Pass clip rectangle around as struct. --- frontends/framebuffer/localhistory.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'frontends/framebuffer') diff --git a/frontends/framebuffer/localhistory.c b/frontends/framebuffer/localhistory.c index 3192f0747..b91c9470b 100644 --- a/frontends/framebuffer/localhistory.c +++ b/frontends/framebuffer/localhistory.c @@ -36,6 +36,7 @@ localhistory_redraw(fbtk_widget_t *widget, fbtk_callback_info *cbi) { struct gui_localhistory *glh = cbi->context; nsfb_bbox_t rbox; + struct rect clip; struct redraw_context ctx = { .interactive = true, @@ -53,12 +54,13 @@ localhistory_redraw(fbtk_widget_t *widget, fbtk_callback_info *cbi) nsfb_plot_rectangle_fill(fbtk_get_nsfb(widget), &rbox, 0xffffffff); + clip.x0 = glh->scrollx; + clip.y0 = glh->scrolly; + clip.x1 = fbtk_get_width(widget) + glh->scrollx; + clip.y0 = fbtk_get_height(widget) + glh->scrolly; + browser_window_history_redraw_rectangle(glh->bw, - glh->scrollx, - glh->scrolly, - fbtk_get_width(widget) + glh->scrollx, - fbtk_get_height(widget) + glh->scrolly, - 0, 0, &ctx); + &clip, 0, 0, &ctx); nsfb_update(fbtk_get_nsfb(widget), &rbox); -- cgit v1.2.3