From: Stefan Csomor Date: Wed, 2 May 2007 14:31:30 +0000 (+0000) Subject: trying optimal scrolling solution perf-wise X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/9372787028129c151c4e53f71c9746765558debb trying optimal scrolling solution perf-wise git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/scrlwing.cpp b/src/generic/scrlwing.cpp index 7db540e792..35d85bbefa 100644 --- a/src/generic/scrlwing.cpp +++ b/src/generic/scrlwing.cpp @@ -500,11 +500,6 @@ void wxScrollHelper::HandleOnScroll(wxScrollWinEvent& event) } bool needsRefresh = false; -#ifdef __WXMAC__ - // OS X blocks on immediate redraws, so make this a refresh - if (!wxScrolledWindowHasChildren(m_targetWindow)) - needsRefresh = true; -#endif int dx = 0, dy = 0; int orient = event.GetOrientation(); @@ -536,7 +531,12 @@ void wxScrollHelper::HandleOnScroll(wxScrollWinEvent& event) // flush all pending repaints before we change m_{x,y}ScrollPosition, as // otherwise invalidated area could be updated incorrectly later when // ScrollWindow() makes sure they're repainted before scrolling them +#ifdef __WXMAC__ + // wxWindowMac is taking care of making sure the update area is correctly + // set up, while not forcing an immediate redraw +#else m_targetWindow->Update(); +#endif } if (orient == wxHORIZONTAL)