diff --git a/docs/changes.txt b/docs/changes.txt index 6f1e99636d..0a09cd51f9 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -581,6 +581,11 @@ All (GUI): - Fix several floating point rounding bugs in wxPropertyGrid (Artur Wieczorek). +wxGTK: + +- Fix infinite sizing loop with GTK3 when using wxScrolled with a non-default + target window. + wxMSW: - Fix compilation with C++Builder XE compiler (Nichka). diff --git a/src/gtk/scrolwin.cpp b/src/gtk/scrolwin.cpp index 9b39077a3d..c500288aae 100644 --- a/src/gtk/scrolwin.cpp +++ b/src/gtk/scrolwin.cpp @@ -81,6 +81,14 @@ void wxScrollHelper::AdjustScrollbars() { int vw, vh; m_targetWindow->GetVirtualSize(&vw, &vh); +#ifdef __WXGTK3__ + if (m_targetWindow != m_win) + { + // setting wxPizza preferred size keeps GtkScrolledWindow from causing + // an infinite sizing loop + gtk_widget_set_size_request(m_win->m_wxwindow, vw, vh); + } +#endif int w, h; const wxSize availSize = GetSizeAvailableForScrollTarget(