Use client size determined by size-allocate when possible

Our client size calculation can be wrong for reasons beyond our control,
notably on Ubuntu 12.04 with overlay scrollbars where the GtkScrolledWindow
"scrollbar-spacing" is wrong. By using the true size from size-allocate
when it becomes available, we can recover from an earlier incorrect client
size calculation. See #14871


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73231 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2012-12-20 18:46:58 +00:00
parent 833e100f7f
commit b0d053c1ea
6 changed files with 65 additions and 37 deletions

View File

@@ -255,7 +255,11 @@ public:
// position and size of the window
int m_x, m_y;
int m_width, m_height;
int m_oldClientWidth,m_oldClientHeight;
int m_clientWidth, m_clientHeight;
// Whether the client size variables above are known to be correct
// (because they have been validated by a size-allocate) and should
// be used to report client size
bool m_useCachedClientSize;
// see the docs in src/gtk/window.cpp
GtkWidget *m_widget; // mostly the widget seen by the rest of GTK