]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/databrow.cpp
Remove no longer necessary re-entrancy check, fix function prototype definition for...
[wxWidgets.git] / src / osx / carbon / databrow.cpp
index d84ee4ba2c37dee2b21406493e9d9d2b04fc3e5e..0c30b68a0f2c738995ba0aaa14bba26270354ef8 100644 (file)
@@ -1059,14 +1059,19 @@ void wxMacDataViewDataBrowserListViewControl::DataBrowserDrawItemProc(DataBrowse
 
  // try to determine the content's size (drawable part):
   Rect      content;
-  RgnHandle rgn(NewRgn());
+  HIShapeRef rgn = NULL;
+  
   UInt16    headerHeight;
 
-  if (this->GetRegion(kControlContentMetaPart,rgn) == noErr)
-    GetRegionBounds(rgn,&content);
+  if ( HIViewCopyShape(m_controlRef, kHIViewContentMetaPart, &rgn) == noErr)
+  {
+    CGRect cgrect;
+    HIShapeGetBounds(rgn, &cgrect);
+    content = (Rect){ cgrect.origin.y, cgrect.origin.x, cgrect.origin.y+cgrect.size.height, cgrect.origin.x+cgrect.size.width };
+    CFRelease(rgn);
+  }
   else
     GetControlBounds(m_controlRef, &content);
-  ::DisposeRgn(rgn);
  // space for the header
   this->GetHeaderButtonHeight(&headerHeight);
   content.top += headerHeight;