From: Vadim Zeitlin Date: Sat, 15 Sep 2007 23:43:03 +0000 (+0000) Subject: fix off by one (or rather "off by border width") bug in ScrollWindow() (part of patch... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/ca86035f16f071d3f6b987bbac9fab174c6079c4 fix off by one (or rather "off by border width") bug in ScrollWindow() (part of patch 1716763) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48715 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/x11/window.cpp b/src/x11/window.cpp index 2e2df49db8..cdcd39a1b0 100644 --- a/src/x11/window.cpp +++ b/src/x11/window.cpp @@ -676,8 +676,8 @@ void wxWindowX11::ScrollWindow(int dx, int dy, const wxRect *rect) if (dx < 0) s_x += -dx; if (dy < 0) s_y += -dy; - if (dx > 0) d_x = dx + offset.x; - if (dy > 0) d_y = dy + offset.y; + if (dx > 0) d_x += dx + offset.x; + if (dy > 0) d_y += dy + offset.y; XCopyArea( xdisplay, xwindow, xwindow, xgc, s_x, s_y, w, h, d_x, d_y );