]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/dcclient.cpp
*** empty log message ***
[wxWidgets.git] / src / gtk1 / dcclient.cpp
index 1dbaf55b39bcf3d0fe50e7709f878a9d90378b23..a99a0791e724807d638783b0db9d8be0b9be93d6 100644 (file)
@@ -1452,14 +1452,23 @@ void wxWindowDC::SetPen( const wxPen &pen )
         {
             for (int i = 0; i < req_nb_dash; i++)
                 real_req_dash[i] = req_dash[i] * width;
         {
             for (int i = 0; i < req_nb_dash; i++)
                 real_req_dash[i] = req_dash[i] * width;
+#if GTK_CHECK_VERSION(1,2,7)
             gdk_gc_set_dashes( m_penGC, 0, (gint8*) real_req_dash,
                              req_nb_dash );
             gdk_gc_set_dashes( m_penGC, 0, (gint8*) real_req_dash,
                              req_nb_dash );
+#else
+            gdk_gc_set_dashes( m_penGC, 0, real_req_dash,
+                             req_nb_dash );
+#endif
             delete[] real_req_dash;
         }
         else
         {
             // No Memory. We use non-scaled dash pattern...
             delete[] real_req_dash;
         }
         else
         {
             // No Memory. We use non-scaled dash pattern...
+#if GTK_CHECK_VERSION(1,2,7)
             gdk_gc_set_dashes( m_penGC, 0, (gint8*)req_dash, req_nb_dash );
             gdk_gc_set_dashes( m_penGC, 0, (gint8*)req_dash, req_nb_dash );
+#else
+            gdk_gc_set_dashes( m_penGC, 0, (char*)req_dash, req_nb_dash );
+#endif
         }
     }
 #endif
         }
     }
 #endif
@@ -2019,7 +2028,10 @@ wxPaintDC::wxPaintDC()
 wxPaintDC::wxPaintDC( wxWindow *win )
   : wxWindowDC( win )
 {
 wxPaintDC::wxPaintDC( wxWindow *win )
   : wxWindowDC( win )
 {
-#if USE_PAINT_REGION    
+#if USE_PAINT_REGION
+    if (!win->m_clipPaintRegion)
+        return;
+        
     m_paintClippingRegion = win->GetUpdateRegion();
     m_currentClippingRegion.Union( m_paintClippingRegion );
         
     m_paintClippingRegion = win->GetUpdateRegion();
     m_currentClippingRegion.Union( m_paintClippingRegion );