]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/dcclient.cpp
just return the min size needed by the sizer for the windows with sizers from their...
[wxWidgets.git] / src / gtk / dcclient.cpp
index 146afce4042fbe5a0a65a3687b430d830d8e2187..3ffd2a177680f366e4843c0f02ebec54c19c62e9 100644 (file)
@@ -1217,8 +1217,14 @@ bool wxWindowDC::DoBlit( wxCoord xdest, wxCoord ydest,
     xsrc = source->LogicalToDeviceX(xsrc);
     ysrc = source->LogicalToDeviceY(ysrc);
 
+    wxBitmap selected;
     wxMemoryDC *memDC = wxDynamicCast(source, wxMemoryDC);
-    wxBitmap selected = source->GetSelectedBitmap();
+    if ( memDC )
+    {
+        selected = memDC->GetSelectedBitmap();
+        if ( !selected.IsOk() )
+            return false;
+    }
 
     bool use_bitmap_method = false;
     bool is_mono = false;
@@ -1229,8 +1235,6 @@ bool wxWindowDC::DoBlit( wxCoord xdest, wxCoord ydest,
         ysrcMask = ysrc;
     }
 
-    if (memDC && !selected.Ok()) return false;
-
     if (selected.Ok())
     {
         is_mono = (selected.GetDepth() == 1);
@@ -1468,11 +1472,11 @@ void wxWindowDC::DoDrawText( const wxString &text, wxCoord x, wxCoord y )
         return;
     size_t datalen = strlen(data);
 
-    // TODO: as soon as Pango provides a function to check at runtime its
-    //       version, we can use it to disable the underline hack for
-    //       Pango >= 1.16 as the "underline of leading/trailing spaces"
-    //       has been fixed there
-    bool needshack = underlined;
+    // in Pango >= 1.16 the "underline of leading/trailing spaces" bug
+    // has been fixed and thus the hack implemented below should never be used
+    static bool pangoOk = !wx_pango_version_check(1, 16, 0);
+
+    bool needshack = underlined && !pangoOk;
     char *hackstring = NULL;
 
     if (needshack)
@@ -1715,7 +1719,7 @@ void wxWindowDC::DoDrawRotatedText( const wxString &text, wxCoord x, wxCoord y,
 void wxWindowDC::DoGetTextExtent(const wxString &string,
                                  wxCoord *width, wxCoord *height,
                                  wxCoord *descent, wxCoord *externalLeading,
-                                 wxFont *theFont) const
+                                 const wxFont *theFont) const
 {
     if ( width )
         *width = 0;