diff --git a/src/gtk/scrolwin.cpp b/src/gtk/scrolwin.cpp index 3c52471d57..72e831f69d 100644 --- a/src/gtk/scrolwin.cpp +++ b/src/gtk/scrolwin.cpp @@ -118,7 +118,8 @@ void wxScrollHelperNative::AdjustScrollbars() int w, h; int vw, vh; - m_targetWindow->m_hasScrolling = m_xScrollPixelsPerLine != 0 || m_yScrollPixelsPerLine != 0; + // this flag indicates which window has the scrollbars + m_win->m_hasScrolling = m_xScrollPixelsPerLine != 0 || m_yScrollPixelsPerLine != 0; m_targetWindow->GetVirtualSize( &vw, &vh ); diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index a83c1c551e..2db80f3896 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -3019,9 +3019,7 @@ void wxWindowGTK::DoGetClientSize( int *width, int *height ) const int dh = 0; if (m_hasScrolling) - { GetScrollbarWidth(m_widget, dw, dh); - } #ifndef __WXUNIVERSAL__ if (HasFlag(wxRAISED_BORDER) || HasFlag(wxSUNKEN_BORDER))