From: David Elliott Date: Mon, 24 Mar 2003 20:38:40 +0000 (+0000) Subject: Use m_dummyNSView (if it exists) in place of m_cocoaNSView to retrieve the X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/576a15443df5f9d643a8504f9605eca4c53d19de?ds=inline Use m_dummyNSView (if it exists) in place of m_cocoaNSView to retrieve the superview's frame rectangle and this NSView's frame rectangle. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19774 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/cocoa/window.mm b/src/cocoa/window.mm index 92adb08bc4..dfe05d763d 100644 --- a/src/cocoa/window.mm +++ b/src/cocoa/window.mm @@ -229,11 +229,12 @@ void wxWindow::DoGetSize(int *w, int *h) const void wxWindow::DoGetPosition(int *x, int *y) const { - NSView *superview = [m_cocoaNSView superview]; + NSView *nsview = m_dummyNSView?m_dummyNSView:m_cocoaNSView; + NSView *superview = [nsview superview]; wxCHECK_RET(superview,"NSView does not have a superview"); NSRect parentRect = [superview frame]; - NSRect cocoaRect = [m_cocoaNSView frame]; + NSRect cocoaRect = [nsview frame]; if(x) *x=(int)cocoaRect.origin.x; if(y)