diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2011-06-30 15:48:07 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2011-06-30 15:48:07 +0000 |
commit | eddae6af0663243a2677674d501f9a87d55798f5 (patch) | |
tree | 08562171f870a6b592d624adfbfd0d6fa11fcdcb /windows/localhistory.c | |
parent | a5dc6b9e6637c85d18510ac6446ee4a8a7955e7b (diff) | |
download | netsurf-eddae6af0663243a2677674d501f9a87d55798f5.tar.gz netsurf-eddae6af0663243a2677674d501f9a87d55798f5.tar.bz2 |
Remove plotter table global. Pass a redraw context around redraw functions. Knockout could be handled better. Note: untested on most front ends.
svn path=/trunk/netsurf/; revision=12543
Diffstat (limited to 'windows/localhistory.c')
-rw-r--r-- | windows/localhistory.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/windows/localhistory.c b/windows/localhistory.c index bd59f4c8a..e7b79cb8e 100644 --- a/windows/localhistory.c +++ b/windows/localhistory.c @@ -78,7 +78,11 @@ static void nsws_localhistory_scroll_check(struct nsws_localhistory *l, struct g static void nsws_localhistory_up(struct nsws_localhistory *l, struct gui_window *gw) { - HDC tmp_hdc; + HDC tmp_hdc; + struct redraw_context ctx = { + .interactive = true, + .plot = &win_plotters + }; LOG(("gui window %p", gw)); @@ -90,7 +94,7 @@ static void nsws_localhistory_up(struct nsws_localhistory *l, struct gui_window tmp_hdc = plot_hdc; plot_hdc = GetDC(l->hwnd); - history_redraw(gw->bw->history); + history_redraw(gw->bw->history, &ctx); ReleaseDC(l->hwnd, plot_hdc); @@ -268,6 +272,11 @@ nsws_localhistory_event_callback(HWND hwnd, UINT msg, case WM_PAINT: { PAINTSTRUCT ps; HDC hdc, tmp_hdc; + struct redraw_context ctx = { + .interactive = true, + .plot = &win_plotters + }; + hdc = BeginPaint(hwnd, &ps); if (gw->bw != NULL) { /* set global HDC for the plotters */ @@ -280,7 +289,7 @@ nsws_localhistory_event_callback(HWND hwnd, UINT msg, gw->localhistory->hscroll + (ps.rcPaint.right - ps.rcPaint.left), gw->localhistory->vscroll + (ps.rcPaint.bottom - ps.rcPaint.top), ps.rcPaint.left, - ps.rcPaint.top); + ps.rcPaint.top, &ctx); plot_hdc = tmp_hdc; |