/////////////////////////////////////////////////////////////////////////////
-// Name: src/mac/carbon/tooltip.cpp
+// Name: src/osx/carbon/tooltip.cpp
// Purpose: wxToolTip implementation
// Author: Stefan Csomor
// Id: $Id$
#include "wx/window.h"
#include "wx/dc.h"
#include "wx/timer.h"
+ #include "wx/nonownedwnd.h"
#endif // WX_PRECOMP
#include "wx/geometry.h"
s_ToolTipWindowRef = m_window ;
m_backpict = NULL ;
#if wxUSE_TIMER
- if ( m_timer )
- delete m_timer ;
+ delete m_timer ;
m_timer = new wxMacToolTipTimer( this , s_ToolTipDelay ) ;
#endif // wxUSE_TIMER
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 ;