From 6cb6cf1fde073a9d18ca84030a224610e3644171 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Thu, 28 Dec 2023 12:26:24 -0800 Subject: [PATCH] Use correct comparison for out-of-window mouse coordinate Coordinates on a window are 0..size-1 --- src/generic/scrlwing.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/generic/scrlwing.cpp b/src/generic/scrlwing.cpp index bcfb096d84..148722a598 100644 --- a/src/generic/scrlwing.cpp +++ b/src/generic/scrlwing.cpp @@ -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;