X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d5d58a93c327198b8d1dd781c7d07626d2b2062a..c39e82f097ecdc5fc9ad24f67e1c71458d4d1ae3:/src/generic/scrlwing.cpp diff --git a/src/generic/scrlwing.cpp b/src/generic/scrlwing.cpp index ffff7d7509..a138011f0e 100644 --- a/src/generic/scrlwing.cpp +++ b/src/generic/scrlwing.cpp @@ -360,15 +360,24 @@ void wxScrollHelper::SetScrollbars(int pixelsPerUnitX, if (do_refresh && !noRefresh) m_targetWindow->Refresh(TRUE, GetScrollRect()); - // TODO: check if we can use AdjustScrollbars always. -#ifdef __WXUNIVERSAL__ - AdjustScrollbars(); -#else - // This is also done by AdjustScrollbars, above +#ifndef __WXUNIVERSAL__ + // If the target is not the same as the window with the scrollbars, + // then we need to update the scrollbars here, since they won't have + // been updated by SetVirtualSize(). + if ( m_targetWindow != m_win ) +#endif // !__WXUNIVERSAL__ + { + AdjustScrollbars(); + } +#ifndef __WXUNIVERSAL__ + else + { + // otherwise this has been done by AdjustScrollbars, above #ifdef __WXMAC__ - m_targetWindow->MacUpdateImmediately() ; -#endif + m_targetWindow->Update() ; #endif + } +#endif // !__WXUNIVERSAL__ } // ---------------------------------------------------------------------------- @@ -496,7 +505,7 @@ void wxScrollHelper::HandleOnScroll(wxScrollWinEvent& event) } #ifdef __WXMAC__ - m_targetWindow->MacUpdateImmediately() ; + m_targetWindow->Update() ; #endif } @@ -604,7 +613,7 @@ int wxScrollHelper::CalcScrollInc(wxScrollWinEvent& event) void wxScrollHelper::AdjustScrollbars() { #ifdef __WXMAC__ - m_targetWindow->MacUpdateImmediately(); + m_targetWindow->Update(); #endif int w = 0, h = 0; @@ -758,7 +767,7 @@ void wxScrollHelper::AdjustScrollbars() } #ifdef __WXMAC__ - m_targetWindow->MacUpdateImmediately(); + m_targetWindow->Update(); #endif } @@ -824,7 +833,7 @@ void wxScrollHelper::Scroll( int x_pos, int y_pos ) ((y_pos == -1) || (y_pos == m_yScrollPosition))) return; #ifdef __WXMAC__ - m_targetWindow->MacUpdateImmediately(); + m_targetWindow->Update(); #endif int w, h; @@ -874,7 +883,7 @@ void wxScrollHelper::Scroll( int x_pos, int y_pos ) } #ifdef __WXMAC__ - m_targetWindow->MacUpdateImmediately(); + m_targetWindow->Update(); #endif } @@ -1254,11 +1263,13 @@ wxGenericScrolledWindow::MSWWindowProc(WXUINT nMsg, { long rc = wxPanel::MSWWindowProc(nMsg, wParam, lParam); +#ifndef __WXWINCE__ // we need to process arrows ourselves for scrolling if ( nMsg == WM_GETDLGCODE ) { rc |= DLGC_WANTARROWS; } +#endif return rc; }