From: Robert Roebling <robert@roebling.de> Date: Tue, 19 Sep 2006 10:22:20 +0000 (+0000) Subject: Fix scrolling bug where client size was reported wrong X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/bf6c0db6243368ee239563a1151156beb5b848fa Fix scrolling bug where client size was reported wrong when the scrollbar size was not subtracted when using a targetwindow != this. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41291 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- 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))