From 57c0a8ac5039cbc8b91d3a898c4f3b54cbde4c24 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Fri, 13 Feb 2009 19:23:58 +0000 Subject: [PATCH] different contentview-offset code, otherwise 'wx' synthetic borders are also taken into account, and round-trips woulnd't be correct anymore git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58887 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/osx/cocoa/window.mm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/osx/cocoa/window.mm b/src/osx/cocoa/window.mm index a11d37eac9..d535ec4879 100644 --- a/src/osx/cocoa/window.mm +++ b/src/osx/cocoa/window.mm @@ -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]; -- 2.45.2