Use correct comparison for out-of-window mouse coordinate

Coordinates on a window are 0..size-1
This commit is contained in:
Paul Cornett 2023-12-28 12:26:24 -08:00
parent 7a306c4a42
commit 6cb6cf1fde

View file

@ -955,12 +955,12 @@ void wxScrollHelperBase::HandleOnMouseLeave(wxMouseEvent& event)
else // we're lower or to the right of the window
{
wxSize size = m_targetWindow->GetClientSize();
if ( pt.x > size.x )
if ( pt.x >= size.x )
{
orient = wxHORIZONTAL;
pos = m_xScrollLines;
}
else if ( pt.y > size.y )
else if ( pt.y >= size.y )
{
orient = wxVERTICAL;
pos = m_yScrollLines;