diff --git a/interface/wx/richtooltip.h b/interface/wx/richtooltip.h index 205ba266a0..62f6c4fdb7 100644 --- a/interface/wx/richtooltip.h +++ b/interface/wx/richtooltip.h @@ -182,6 +182,8 @@ public: window which must be non-@NULL or, if @a rect is non-@NULL, the middle of the specified wxRect. + The coordinates of the @a rect parameter are relative to the given window. + Currently the native MSW implementation is used only if @a win is a wxTextCtrl and @a rect is @NULL. This limitation may be removed in the future. diff --git a/src/generic/richtooltipg.cpp b/src/generic/richtooltipg.cpp index 0c00e24a67..5d08e1261a 100644 --- a/src/generic/richtooltipg.cpp +++ b/src/generic/richtooltipg.cpp @@ -239,7 +239,7 @@ public: 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.