[SHELL32]
authorGiannis Adamopoulos <gadamopoulos@reactos.org>
Wed, 27 Jul 2016 20:51:36 +0000 (20:51 +0000)
committerGiannis Adamopoulos <gadamopoulos@reactos.org>
Wed, 27 Jul 2016 20:51:36 +0000 (20:51 +0000)
- Query the drop effect from the key state. After latest wine sync we correctly get all possible effects instead of the effect of the last DragOver event.
CORE-11681

svn path=/trunk/; revision=72026

reactos/dll/win32/shell32/folders/CFSFolder.cpp

index 867f7da..c6eae61 100644 (file)
@@ -1177,7 +1177,7 @@ BOOL CFSFolder::QueryDrop(DWORD dwKeyState, LPDWORD pdwEffect)
 
     if (fAcceptFmt) { /* Does our interpretation of the keystate ... */
         *pdwEffect = KeyStateToDropEffect (dwKeyState);
-
+        
         if (*pdwEffect == DROPEFFECT_NONE)
             *pdwEffect = dwEffect;
 
@@ -1236,6 +1236,11 @@ HRESULT WINAPI CFSFolder::Drop(IDataObject *pDataObject,
 {
     TRACE("(%p) object dropped, effect %u\n", this, *pdwEffect);
     
+    if (!pdwEffect)
+        return E_INVALIDARG;
+
+    QueryDrop(dwKeyState, pdwEffect);
+
     BOOL fIsOpAsync = FALSE;
     CComPtr<IAsyncOperation> pAsyncOperation;