X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d7e0024b09f3141bc0c14e74b376cd2fb9567335..18fa735d20b4c66db72b51d60b82a2b3f2cda763:/src/msw/window.cpp diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 2067b22fa5..81bf8d2465 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -17,10 +17,6 @@ // 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