Fix autopan sticking on Windows due to lost events

Fixes https://gitlab.com/kicad/code/kicad/-/issues/11425
This commit is contained in:
Mark Roszko 2022-09-07 14:30:59 +00:00
parent 2393165ada
commit 030a562ba6
1 changed files with 12 additions and 0 deletions

View File

@ -507,6 +507,18 @@ void WX_VIEW_CONTROLS::onTimer( wxTimerEvent& aEvent )
return;
}
#ifdef __WXMSW__
// Hackfix: It's possible for the mouse to leave the canvas
// without triggering any leave events on windows
// Use a MSW only wx function
if( !m_parentPanel->IsMouseInWindow() )
{
m_panTimer.Stop();
m_state = IDLE;
return;
}
#endif
if( !m_parentPanel->HasFocus() )
break;