X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/08291defc22aaa6bdfb16fa5c45f4da0ed420a12..d53f610c1c224b6a0f58e4009b2bce553b1ff7b9:/src/msw/ole/droptgt.cpp?ds=inline diff --git a/src/msw/ole/droptgt.cpp b/src/msw/ole/droptgt.cpp index 4601d19be4..3ca2761733 100644 --- a/src/msw/ole/droptgt.cpp +++ b/src/msw/ole/droptgt.cpp @@ -244,15 +244,20 @@ STDMETHODIMP wxIDropTarget::DragOver(DWORD grfKeyState, result = wxDragNone; } - // we need client coordinates to pass to wxWin functions - if ( !ScreenToClient(m_hwnd, (POINT *)&pt) ) - { - wxLogLastError(wxT("ScreenToClient")); - } + if ( result != wxDragNone ) { + // we need client coordinates to pass to wxWin functions + if ( !ScreenToClient(m_hwnd, (POINT *)&pt) ) + { + wxLogLastError(wxT("ScreenToClient")); + } - *pdwEffect = ConvertDragResultToEffect( - m_pTarget->OnDragOver(pt.x, pt.y, result) - ); + *pdwEffect = ConvertDragResultToEffect( + m_pTarget->OnDragOver(pt.x, pt.y, result) + ); + } + else { + *pdwEffect = DROPEFFECT_NONE; + } return S_OK; }