X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/489468feaa08b8f504735eecca522fb8d0f825d2..08670ea85abf4b4946a9ce64971b591d7b1ee30b:/src/osx/carbon/overlay.cpp?ds=sidebyside diff --git a/src/osx/carbon/overlay.cpp b/src/osx/carbon/overlay.cpp index 3ae300276a..70a73399ee 100644 --- a/src/osx/carbon/overlay.cpp +++ b/src/osx/carbon/overlay.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: src/mac/carbon/overlay.cpp +// Name: src/osx/carbon/overlay.cpp // Purpose: common wxOverlay code // Author: Stefan Csomor // Modified by: @@ -60,15 +60,13 @@ void wxOverlayImpl::MacGetBounds( Rect *bounds ) int x, y; x=y=0; m_window->MacWindowToRootWindow( &x , &y ) ; - WindowRef window = (WindowRef) m_window->MacGetTopLevelWindowRef() ; + wxNonOwnedWindow* tlw = m_window->MacGetTopLevelWindow(); + tlw->GetNonOwnedPeer()->WindowToScreen( &x, &y ); - Point localwhere = { y, x }; - wxMacLocalToGlobal( window, &localwhere ) ; - - bounds->top = localwhere.v+m_y; - bounds->left = localwhere.h+m_x; - bounds->bottom = localwhere.v+m_y+m_height; - bounds->right = localwhere.h+m_x+m_width; + bounds->top = y+m_y; + bounds->left = x+m_x; + bounds->bottom = y+m_y+m_height; + bounds->right = x+m_x+m_width; } OSStatus wxOverlayImpl::CreateOverlayWindow()