]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/dc.cpp
adding OS level Window Menu by default
[wxWidgets.git] / src / mac / carbon / dc.cpp
index e108c612102c7191e5b94d1b53229e1c9a679aa4..e3439b8aec662bfeb53d58f646af522cb9c62b7c 100644 (file)
@@ -35,9 +35,8 @@ using namespace std ;
 #include <ATSUnicode.h>
 #include <TextCommon.h>
 #include <TextEncodingConverter.h>
-#if !USE_SHARED_LIBRARY
+
 IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject)
-#endif
 
 //-----------------------------------------------------------------------------
 // constants
@@ -418,8 +417,12 @@ void wxDC::DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y )
 
     wxCoord xx = XLOG2DEVMAC(x);
     wxCoord yy = YLOG2DEVMAC(y);
+    wxCoord w = icon.GetWidth();
+    wxCoord h = icon.GetHeight();
+    wxCoord ww = XLOG2DEVREL(w);
+    wxCoord hh = YLOG2DEVREL(h);
 
-    Rect r = { yy , xx, yy + 32  , xx + 32 } ;
+    Rect r = { yy , xx, yy + hh  , xx + ww } ;
     PlotIconRef( &r , kAlignNone , kTransformNone , kPlotIconRefNormalFlags , MAC_WXHICON( icon.GetHICON() ) ) ;
 }
 
@@ -453,11 +456,6 @@ void wxDC::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord hei
 void wxDC::DoSetClippingRegionAsRegion( const wxRegion &region  )
 {
     wxCHECK_RET( Ok(), wxT("invalid window dc") ) ;
-    if (region.Empty())
-    {
-        DestroyClippingRegion();
-        return;
-    }
     wxMacFastPortSetter helper(this) ;
     wxCoord x, y, w, h;
     region.GetBox( x, y, w, h );