]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/window.cpp
reverted last (accidental) change
[wxWidgets.git] / src / msw / window.cpp
index 2067b22fa50380170deec837789f9c873568fc34..81bf8d24655b306a517575ed19cbb672a2aa8922 100644 (file)
 // headers
 // ---------------------------------------------------------------------------
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma implementation "window.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
@@ -810,7 +806,7 @@ void wxWindowMSW::WarpPointer(int x, int y)
     }
 }
 
-void wxWindowMSW::MSWUpdateUIState()
+void wxWindowMSW::MSWUpdateUIState(int action)
 {
     // WM_UPDATEUISTATE only appeared in Windows 2000 so it can do us no good
     // to use it on older systems -- and could possibly do some harm
@@ -828,8 +824,7 @@ void wxWindowMSW::MSWUpdateUIState()
         //     include just one UISF_XXX or both, both are affected, no idea
         //     why
         ::SendMessage(GetHwnd(), WM_UPDATEUISTATE,
-                        MAKEWPARAM(UIS_INITIALIZE,
-                                   UISF_HIDEFOCUS | UISF_HIDEACCEL), 0);
+                      MAKEWPARAM(action, UISF_HIDEFOCUS | UISF_HIDEACCEL), 0);
     }
 }
 
@@ -2088,7 +2083,7 @@ bool wxWindowMSW::MSWProcessMessage(WXMSG* pMsg)
                     // this by default, we need to manually send this message
                     // so that controls could change their appearance
                     // appropriately
-                    MSWUpdateUIState();
+                    MSWUpdateUIState(UIS_CLEAR);
 
                     return true;
                 }
@@ -4626,6 +4621,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