X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9fce8d2eeea6879644acec98e1244516eb053b78..1f86850d45e786987db4884ba9403eec510625f7:/src/msw/window.cpp diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 1f7b937009..285299a2ff 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -901,16 +901,22 @@ void wxWindowMSW::SetScrollbar(int orient, int pos, int thumbVisible, void wxWindowMSW::ScrollWindow(int dx, int dy, const wxRect *prect) { - RECT rect; + RECT rect, *pr; if ( prect ) { rect.left = prect->x; rect.top = prect->y; rect.right = prect->x + prect->width; rect.bottom = prect->y + prect->height; + + pr = ▭ + } + else + { + pr = NULL; } - ::ScrollWindow(GetHwnd(), dx, dy, prect ? &rect : NULL, NULL); + ::ScrollWindow(GetHwnd(), dx, dy, pr, pr); } static bool ScrollVertically(HWND hwnd, int kind, int count) @@ -1180,7 +1186,7 @@ void wxWindowMSW::OnIdle(wxIdleEvent& WXUNUSED(event)) // Check if we need to send a LEAVE event if ( m_mouseInWindow ) { - if ( !IsMouseInWindow() && HasCapture()) + if ( !IsMouseInWindow() && !HasCapture()) { // Generate a LEAVE event m_mouseInWindow = FALSE;