From: Kevin Hock Date: Sun, 11 Sep 2005 19:54:58 +0000 (+0000) Subject: Send mouse leave events in HandleMouseMove if HAVE_TRACKMOUSEEVENT is defined and... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/cff58b52994be223d4e6b183084435b761d6ee81 Send mouse leave events in HandleMouseMove if HAVE_TRACKMOUSEEVENT is defined and the window has captured the mouse. This used to be done in OnInternalIdle, which now only sends leave events when HAVE_TRACKMOUSEEVENT is *not* defined. Patch from Jamie Gadd, posted 9/10/2005 on wx-dev. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35474 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 2067b22fa5..800b06910d 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -4626,6 +4626,18 @@ bool wxWindowMSW::HandleMouseMove(int x, int y, WXUINT flags) (void)GetEventHandler()->ProcessEvent(event); } } +#ifdef HAVE_TRACKMOUSEEVENT + else + { + // Check if we need to send a LEAVE event + // Windows doesn't send WM_MOUSELEAVE if the mouse has been captured so + // send it here if we are using native mouse leave tracking + if ( HasCapture() && !IsMouseInWindow() ) + { + GenerateMouseLeave(); + } + } +#endif // HAVE_TRACKMOUSEEVENT #if wxUSE_MOUSEEVENT_HACK // Window gets a click down message followed by a mouse move message even