Get DC size from GDK window if possible, client size can unfortunately be wrong

This should fix wxDC::Clear() not clearing the whole window on Ubuntu 12.04 with overlay scrollbars
see #14871


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73185 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett 2012-12-14 06:25:00 +00:00
parent 12c6bfab40
commit ffc28384ca
2 changed files with 4 additions and 5 deletions

View File

@ -288,10 +288,6 @@ bool wxApp::Initialize(int& argc_, wxChar **argv_)
if ( !wxAppBase::Initialize(argc_, argv_) )
return false;
// disable Ubuntu "overlay scrollbar" until we figure out how to keep it
// from messing up our window contents when scrolling, see ticket #14871
wxSetEnv(wxS("LIBOVERLAY_SCROLLBAR"), wxS("0"));
#if wxUSE_THREADS
if (!g_thread_supported())
{

View File

@ -2103,7 +2103,10 @@ void wxClientDCImpl::DoGetSize(int *width, int *height) const
{
wxCHECK_RET( m_window, wxT("GetSize() doesn't work without window") );
m_window->GetClientSize( width, height );
if (m_window->m_wxwindow && m_gdkwindow)
gdk_drawable_get_size(m_gdkwindow, width, height);
else
m_window->GetClientSize(width, height);
}
//-----------------------------------------------------------------------------