added missing include file and corrected memory leak due to creation of

never used region (NewRgn)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19426 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Gilles Depeyrot 2003-03-02 19:57:47 +00:00
parent 9ca4dd06de
commit a73903480f
2 changed files with 6 additions and 4 deletions

View File

@ -17,6 +17,7 @@
#include "wx/app.h"
#include "wx/mac/uma.h"
#include "wx/dcmemory.h"
#include "wx/dcprint.h"
#include "wx/region.h"
#include "wx/image.h"
#include "wx/log.h"
@ -25,6 +26,7 @@
#include "math.h"
using namespace std ;
#endif
#include "wx/mac/private.h"
#include "ATSUnicode.h"
#include "TextCommon.h"
@ -88,7 +90,6 @@ wxMacWindowClipper::wxMacWindowClipper( const wxWindow* win )
SetClip( m_newClip ) ;
DisposeRgn( insidergn ) ;
#endif
RgnHandle insidergn = NewRgn() ;
int x = 0 , y = 0;
win->MacWindowToRootWindow( &x,&y ) ;
CopyRgn( (RgnHandle) ((wxWindow*)win)->MacGetVisibleRegion().GetWXHRGN() , m_newClip ) ;
@ -2202,4 +2203,4 @@ wxCoord wxDCBase::LogicalToDeviceXRel(wxCoord x) const
wxCoord wxDCBase::LogicalToDeviceYRel(wxCoord y) const
{
return ((wxDC *)this)->YLOG2DEVREL(y);
}
}

View File

@ -17,6 +17,7 @@
#include "wx/app.h"
#include "wx/mac/uma.h"
#include "wx/dcmemory.h"
#include "wx/dcprint.h"
#include "wx/region.h"
#include "wx/image.h"
#include "wx/log.h"
@ -25,6 +26,7 @@
#include "math.h"
using namespace std ;
#endif
#include "wx/mac/private.h"
#include "ATSUnicode.h"
#include "TextCommon.h"
@ -88,7 +90,6 @@ wxMacWindowClipper::wxMacWindowClipper( const wxWindow* win )
SetClip( m_newClip ) ;
DisposeRgn( insidergn ) ;
#endif
RgnHandle insidergn = NewRgn() ;
int x = 0 , y = 0;
win->MacWindowToRootWindow( &x,&y ) ;
CopyRgn( (RgnHandle) ((wxWindow*)win)->MacGetVisibleRegion().GetWXHRGN() , m_newClip ) ;
@ -2202,4 +2203,4 @@ wxCoord wxDCBase::LogicalToDeviceXRel(wxCoord x) const
wxCoord wxDCBase::LogicalToDeviceYRel(wxCoord y) const
{
return ((wxDC *)this)->YLOG2DEVREL(y);
}
}