From 5fba1fb94d875a849d3c9092943406b7cab4d27a Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 26 Apr 2017 22:27:49 +0100 Subject: Update windows frontend for set_scroll API change --- frontends/windows/drawable.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'frontends/windows/drawable.c') diff --git a/frontends/windows/drawable.c b/frontends/windows/drawable.c index 0bd1bae87..4540b1293 100644 --- a/frontends/windows/drawable.c +++ b/frontends/windows/drawable.c @@ -137,8 +137,10 @@ nsws_drawable_vscroll(struct gui_window *gw, HWND hwnd, WPARAM wparam) SetScrollInfo(hwnd, SB_VERT, &si, TRUE); GetScrollInfo(hwnd, SB_VERT, &si); if (si.nPos != mem) { - win32_window_set_scroll(gw, gw->scrollx, gw->scrolly + - gw->requestscrolly + si.nPos - mem); + struct rect rect; + rect.x0 = rect.x1 = gw->scrollx; + rect.y0 = rect.y1 = gw->scrolly + gw->requestscrolly + si.nPos - mem; + win32_window_set_scroll(gw, &rect); } return 0; @@ -201,9 +203,10 @@ nsws_drawable_hscroll(struct gui_window *gw, HWND hwnd, WPARAM wparam) SetScrollInfo(hwnd, SB_HORZ, &si, TRUE); GetScrollInfo(hwnd, SB_HORZ, &si); if (si.nPos != mem) { - win32_window_set_scroll(gw, - gw->scrollx + gw->requestscrollx + si.nPos - mem, - gw->scrolly); + struct rect rect; + rect.x0 = rect.x1 = gw->scrollx + gw->requestscrollx + si.nPos - mem; + rect.y0 = rect.y1 = gw->scrolly; + win32_window_set_scroll(gw, &rect); } return 0; -- cgit v1.2.3