X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/489468feaa08b8f504735eecca522fb8d0f825d2..0b134cd00db2f8528a985c48cf97615770e0c339:/src/osx/carbon/tooltip.cpp diff --git a/src/osx/carbon/tooltip.cpp b/src/osx/carbon/tooltip.cpp index 957feb0491..701023ad5f 100644 --- a/src/osx/carbon/tooltip.cpp +++ b/src/osx/carbon/tooltip.cpp @@ -18,10 +18,11 @@ #include "wx/window.h" #include "wx/dc.h" #include "wx/timer.h" + #include "wx/nonownedwnd.h" #endif // WX_PRECOMP #include "wx/geometry.h" -#include "wx/mac/uma.h" +#include "wx/osx/uma.h" //----------------------------------------------------------------------------- // global data @@ -224,9 +225,12 @@ void wxMacToolTip::Draw() HMHelpContentRec tag ; tag.version = kMacHelpVersion; - Point p = { m_position.y , m_position.x }; - wxMacLocalToGlobal( m_window , &p ) ; - SetRect( &tag.absHotRect , p.h - 2 , p.v - 2 , p.h + 2 , p.v + 2 ); + int x = m_position.x; + int y = m_position.y; + wxNonOwnedWindow* tlw = wxNonOwnedWindow::GetFromWXWindow((WXWindow) m_window); + if ( tlw ) + tlw->GetNonOwnedPeer()->WindowToScreen( &x, &y ); + SetRect( &tag.absHotRect , x - 2 , y - 2 , x + 2 , y + 2 ); m_helpTextRef = wxCFStringRef( m_label , wxFONTENCODING_DEFAULT ) ; tag.content[kHMMinimumContentIndex].contentType = kHMCFStringContent ;