Ticket #15060: richtooltip_winrect.patch

File richtooltip_winrect.patch, 1.3 KB (added by lpoujoulat, 5 years ago)
  • interface/wx/richtooltip.h

     
    181181        By default the tooltip tip points to the (middle of the) specified
    182182        window which must be non-@NULL or, if @a rect is non-@NULL, the middle
    183183        of the specified wxRect.
     184       
     185        The coordinates of the @a rect parameter are relative to the given window.
    184186
    185187        Currently the native MSW implementation is used only if @a win is a
    186188        wxTextCtrl and @a rect is @NULL. This limitation may be removed in the
  • src/generic/richtooltipg.cpp

     
    239239        if ( !rect || rect->IsEmpty() )
    240240            pos = GetTipPoint();
    241241        else
    242             pos = wxPoint( rect->x + rect->width / 2, rect->y + rect->height / 2 );
     242            pos = GetParent()->ClientToScreen( wxPoint( rect->x + rect->width / 2, rect->y + rect->height / 2 ) );
    243243
    244244        // We want our anchor point to coincide with this position so offset
    245245        // the position of the top left corner passed to Move() accordingly.