]> git.saurik.com Git - wxWidgets.git/commitdiff
Get DC size from GDK window if possible, client size can unfortunately be wrong
authorPaul Cornett <paulcor@bullseye.com>
Fri, 14 Dec 2012 06:25:00 +0000 (06:25 +0000)
committerPaul Cornett <paulcor@bullseye.com>
Fri, 14 Dec 2012 06:25:00 +0000 (06:25 +0000)
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

src/gtk/app.cpp
src/gtk/dcclient.cpp

index 7aba0eab72bbd3bbf484c3e116d4bf32b5a62d1c..3754531c01719eec088d7256fea9fee7700b4315 100644 (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())
     {
index 0ad9159ef58344153a28117c32e59e980ade8102..4c4416ebe13449da3a2a2e1b4373e32237ecb7b1 100644 (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);
 }
 
 //-----------------------------------------------------------------------------