diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 44fb41d769..3f8bd5c12b 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -1273,7 +1273,9 @@ void wxWindowMSW::OnIdle(wxIdleEvent& WXUNUSED(event)) // Check if we need to send a LEAVE event if ( m_mouseInWindow ) { - if ( !IsMouseInWindow() && !HasCapture()) + // note that we should generate the leave event whether the window has + // or doesn't have mouse capture + if ( !IsMouseInWindow() ) { // Generate a LEAVE event m_mouseInWindow = FALSE;