Fix regression in MSW DoDragDrop() return code

It always returned wxDragNone since the changes of f5548e399e (Fix
problem with dragged icon remaining on screen under MSW 10, 2020-01-11)
which wrongly changed pdwEffect to DROPEFFECT_NONE before doing anything
else, disregarding the fact that it's an in-out parameter and not just
an output one.

Fix this by simply not doing this, just as it hadn't been done before.

See #18499.
This commit is contained in:
Vadim Zeitlin
2020-05-03 03:13:01 +02:00
parent c88f3a114c
commit b6c593af45

View File

@@ -371,9 +371,6 @@ STDMETHODIMP wxIDropTarget::Drop(IDataObject *pIDataSource,
wxLogLastError(wxT("ScreenToClient"));
}
// Initialize it to a safe value in case OnDrop() throws.
*pdwEffect = DROPEFFECT_NONE;
// Create a guard that will clean things up in case of exception: we
// must perform it in any case, as if we don't update the drag image it
// would remain on screen under Windows 10, see #18499.