summaryrefslogtreecommitdiff
path: root/frontends
diff options
context:
space:
mode:
authorJames Woodcock <james_woodcock@yahoo.co.uk>2017-07-30 10:24:13 +0100
committerVincent Sanders <vince@kyllikki.org>2017-07-30 10:24:13 +0100
commit8c3d79f6fbd7608e9449b8d6213cb07d507423fe (patch)
tree6cec905bb6877e4a2ed2f44b80cd277a2e5a282b /frontends
parent5a9afe471c21de6af798a7f82ca31ece598f8c2e (diff)
downloadnetsurf-8c3d79f6fbd7608e9449b8d6213cb07d507423fe.tar.gz
netsurf-8c3d79f6fbd7608e9449b8d6213cb07d507423fe.tar.bz2
fix redraw on window resize
A race condition with WM_PAINT can cause win32_window_set_scroll() to use the old window size. If this happens, the page data will not get drawn from the top left of the window but offset quite a large distance down and to the right.
Diffstat (limited to 'frontends')
-rw-r--r--frontends/windows/window.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/frontends/windows/window.c b/frontends/windows/window.c
index 976974cfa..c72173697 100644
--- a/frontends/windows/window.c
+++ b/frontends/windows/window.c
@@ -1339,7 +1339,6 @@ nsws_window_resize(struct gui_window *gw,
WPARAM wparam,
LPARAM lparam)
{
- struct rect rect;
RECT rstatus, rtool;
if ((gw->toolbar == NULL) ||
@@ -1352,7 +1351,6 @@ nsws_window_resize(struct gui_window *gw,
GetClientRect(gw->toolbar, &rtool);
GetWindowRect(gw->statusbar, &rstatus);
- win32_window_get_scroll(gw, &rect.x0, &rect.y0);
gw->width = LOWORD(lparam);
gw->height = HIWORD(lparam) - (rtool.bottom - rtool.top) - (rstatus.bottom - rstatus.top);
@@ -1366,7 +1364,7 @@ nsws_window_resize(struct gui_window *gw,
}
nsws_window_update_forward_back(gw);
- win32_window_set_scroll(gw, &rect);
+ browser_window_update(gw->bw, false);
if (gw->toolbar != NULL) {
SendMessage(gw->toolbar, TB_SETSTATE,