X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1934d291cd9e4e7eb1b8aba92e3f35b35f0618b1..da00a8bb164dd1f58dd0bb211475538a375867b4:/src/x11/region.cpp?ds=sidebyside diff --git a/src/x11/region.cpp b/src/x11/region.cpp index 6ed3767c11..1f7f4d5929 100644 --- a/src/x11/region.cpp +++ b/src/x11/region.cpp @@ -434,13 +434,13 @@ public: wxRIRefData::~wxRIRefData() { - delete m_rects; + delete [] m_rects; } void wxRIRefData::CreateRects( const wxRegion& region ) { if (m_rects) - delete m_rects; + delete [] m_rects; m_rects = 0; m_numRects = 0; @@ -450,6 +450,16 @@ void wxRIRefData::CreateRects( const wxRegion& region ) Region r = (Region) region.GetX11Region(); if (r) { +#if wxUSE_NANOX + GR_RECT rect; + GrGetRegionBox(r, & rect); + m_numRects = 1; + m_rects = new wxRect[1]; + m_rects[0].x = rect.x; + m_rects[0].y = rect.y; + m_rects[0].width = rect.width; + m_rects[0].height = rect.height; +#else m_numRects = r->numRects; if (m_numRects) { @@ -464,6 +474,7 @@ void wxRIRefData::CreateRects( const wxRegion& region ) wr.height = xr.y2-xr.y1; } } +#endif } }