From: Vadim Zeitlin Date: Thu, 9 Mar 2006 03:03:15 +0000 (+0000) Subject: don't check that the cursor is over the window calling SetCursor(), it might have... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/8e75dca831c11d5bb61c31c65f408e6273d36465 don't check that the cursor is over the window calling SetCursor(), it might have captured it and so want to change the cursor even when it's outside the window boundaries git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37919 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/window.cpp b/src/msw/window.cpp index a80bee3a53..c1147c0c96 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -798,22 +798,10 @@ bool wxWindowMSW::SetCursor(const wxCursor& cursor) return false; } - if ( m_cursor.Ok() ) + // don't "overwrite" busy cursor + if ( m_cursor.Ok() && !wxIsBusy() ) { - HWND hWnd = GetHwnd(); - - // Change the cursor NOW if we're within the correct window - POINT point; -#ifdef __WXWINCE__ - ::GetCursorPosWinCE(&point); -#else - ::GetCursorPos(&point); -#endif - - RECT rect = wxGetWindowRect(hWnd); - - if ( ::PtInRect(&rect, point) && !wxIsBusy() ) - ::SetCursor(GetHcursorOf(m_cursor)); + ::SetCursor(GetHcursorOf(m_cursor)); } return true; @@ -1957,7 +1945,7 @@ bool wxWindowMSW::DoPopupMenu(wxMenu *menu, int x, int y) #if defined(__WXWINCE__) UINT flags = 0; #else - UINT flags = TPM_RIGHTBUTTON; + UINT flags = TPM_RIGHTBUTTON | TPM_RECURSE; #endif ::TrackPopupMenu(hMenu, flags, point.x, point.y, 0, hWnd, NULL);