Use correct comparison for out-of-window mouse coordinate
Coordinates on a window are 0..size-1
This commit is contained in:
parent
7a306c4a42
commit
6cb6cf1fde
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue