From 8c3d79f6fbd7608e9449b8d6213cb07d507423fe Mon Sep 17 00:00:00 2001 From: James Woodcock Date: Sun, 30 Jul 2017 10:24:13 +0100 Subject: 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. --- frontends/windows/window.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'frontends/windows/window.c') 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, -- cgit v1.2.3