]> git.saurik.com Git - wxWidgets.git/commitdiff
different contentview-offset code, otherwise 'wx' synthetic borders are also taken...
authorStefan Csomor <csomor@advancedconcepts.ch>
Fri, 13 Feb 2009 19:23:58 +0000 (19:23 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Fri, 13 Feb 2009 19:23:58 +0000 (19:23 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58887 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/cocoa/window.mm

index a11d37eac9bb9ccf37822a75e17c270347fad951..d535ec48798da71c7614d7960f8964260098f965 100644 (file)
@@ -703,8 +703,10 @@ void wxWidgetCocoaImpl::resetCursorRects(WXWidget slf, void *_cmd)
             superimpl(slf, (SEL)_cmd);
         }
         else
+        {
             [slf addCursorRect: [slf bounds]
                 cursor: cursor];
+        }
     }
 }
   
@@ -943,9 +945,13 @@ void wxWidgetCocoaImpl::Move(int x, int y, int width, int height)
     // adjust the coordinates
     if (parent)
     {
-        wxPoint pt(parent->GetClientAreaOrigin());
-        x -= pt.x;
-        y -= pt.y;
+        int cx = 0,cy = 0,cw = 0,ch = 0;
+        if ( parent->GetPeer() )
+        {
+            parent->GetPeer()->GetContentArea(cx, cy, cw, ch);
+            x -= cx;
+            y -= cy;
+        }
     }
     NSRect r = wxToNSRect( [m_osxView superview], wxRect(x,y,width, height) );
     [m_osxView setFrame:r];