X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/faa9a600f4ee45757039be01acb0865d1bbae957..65751a0ee7a4cfaef9f459c29bfd67f5be6d893b:/src/gtk1/dcclient.cpp diff --git a/src/gtk1/dcclient.cpp b/src/gtk1/dcclient.cpp index 498f19623a..9fa41bf7f4 100644 --- a/src/gtk1/dcclient.cpp +++ b/src/gtk1/dcclient.cpp @@ -1143,8 +1143,11 @@ bool wxWindowDCImpl::DoBlit( wxCoord xdest, wxCoord ydest, xsrc = source->LogicalToDeviceX(xsrc); ysrc = source->LogicalToDeviceY(ysrc); - wxClientDCImpl *srcDC = (wxClientDCImpl*)source->GetImpl(); - wxMemoryDCImpl *memDC = (wxMemoryDCImpl*)source; + wxWindowDCImpl *srcDC = wxDynamicCast(source->GetImpl(), wxWindowDCImpl); + wxCHECK_MSG( srcDC, false, "source must be a window DC" ); + + // FIXME: this cast is not always valid, see the code using m_isMemDC + wxMemoryDCImpl *memDC = wx_static_cast(wxMemoryDCImpl *, srcDC); bool use_bitmap_method = false; bool is_mono = false; @@ -2018,7 +2021,7 @@ void wxWindowDCImpl::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, w gdk_gc_set_clip_region( m_bgGC, m_currentClippingRegion.GetRegion() ); } -void wxWindowDCImpl::DoSetClippingRegionAsRegion( const wxRegion ®ion ) +void wxWindowDCImpl::DoSetDeviceClippingRegion( const wxRegion ®ion ) { wxCHECK_RET( IsOk(), wxT("invalid window dc") );