X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8a16d7370e3cdc7d583a6f14ab11b3a1d27b73df..44d0f703f9cba47009e33cd248f78bef941ba99b:/src/gtk1/region.cpp?ds=sidebyside diff --git a/src/gtk1/region.cpp b/src/gtk1/region.cpp index acad6e5f64..ea44a6498f 100644 --- a/src/gtk1/region.cpp +++ b/src/gtk1/region.cpp @@ -49,7 +49,7 @@ private: // wxRegionRefData: private class containing the information about the region // ---------------------------------------------------------------------------- -class wxRegionRefData : public wxObjectRefData +class wxRegionRefData : public wxGDIRefData { public: wxRegionRefData() @@ -58,7 +58,7 @@ public: } wxRegionRefData(const wxRegionRefData& refData) - : wxObjectRefData() + : wxGDIRefData() { m_region = gdk_regions_union(wxGdkRegion(), refData.m_region); } @@ -136,12 +136,12 @@ wxRegion::~wxRegion() // m_refData unrefed in ~wxObject } -wxObjectRefData *wxRegion::CreateRefData() const +wxGDIRefData *wxRegion::CreateGDIRefData() const { return new wxRegionRefData; } -wxObjectRefData *wxRegion::CloneRefData(const wxObjectRefData *data) const +wxGDIRefData *wxRegion::CloneGDIRefData(const wxGDIRefData *data) const { return new wxRegionRefData(*(wxRegionRefData *)data); } @@ -187,7 +187,9 @@ bool wxRegion::DoUnionWithRect(const wxRect& r) rect.width = r.width; rect.height = r.height; - gdk_region_union_with_rect( M_REGIONDATA->m_region, &rect ); + GdkRegion *reg = gdk_region_union_with_rect( M_REGIONDATA->m_region, &rect ); + gdk_region_destroy( M_REGIONDATA->m_region ); + M_REGIONDATA->m_region = reg; } return TRUE; @@ -380,7 +382,7 @@ struct _XRegion { }; -class wxRIRefData: public wxObjectRefData +class wxRIRefData : public wxGDIRefData { public: wxRIRefData() { Init(); }