]> git.saurik.com Git - wxWidgets.git/commitdiff
Send mouse leave events in HandleMouseMove if HAVE_TRACKMOUSEEVENT is defined and...
authorKevin Hock <hockkn@yahoo.com>
Sun, 11 Sep 2005 19:54:58 +0000 (19:54 +0000)
committerKevin Hock <hockkn@yahoo.com>
Sun, 11 Sep 2005 19:54:58 +0000 (19:54 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35474 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/window.cpp

index 2067b22fa50380170deec837789f9c873568fc34..800b06910dc2347c975664eb9e5191acd8e158b0 100644 (file)
@@ -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