X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/34ece4ff0eb7ef58f3a3b1ce90c6392728fa0b30..12bb29f5432174ecbd65549bda832d70d34a98ae:/src/generic/richtooltipg.cpp?ds=sidebyside diff --git a/src/generic/richtooltipg.cpp b/src/generic/richtooltipg.cpp index 82f8b16966..5d08e1261a 100644 --- a/src/generic/richtooltipg.cpp +++ b/src/generic/richtooltipg.cpp @@ -232,14 +232,14 @@ public: } } - void SetPosition(wxRect* rect) + void SetPosition(const wxRect* rect) { wxPoint pos; if ( !rect || rect->IsEmpty() ) pos = GetTipPoint(); else - pos = wxPoint( rect->x + rect->width / 2, rect->y + rect->height / 2 ); + pos = GetParent()->ClientToScreen( wxPoint( rect->x + rect->width / 2, rect->y + rect->height / 2 ) ); // We want our anchor point to coincide with this position so offset // the position of the top left corner passed to Move() accordingly. @@ -673,7 +673,7 @@ void wxRichToolTipGenericImpl::SetTitleFont(const wxFont& font) m_titleFont = font; } -void wxRichToolTipGenericImpl::ShowFor(wxWindow* win, wxRect* rect) +void wxRichToolTipGenericImpl::ShowFor(wxWindow* win, const wxRect* rect) { // Set the focus to the window the tooltip refers to to make it look active. win->SetFocus();