[PATCH] winex11.drv: ignore .dwAspect in FORMATETC during XDnD

Damjan Jovanovic damjan.jov at gmail.com
Thu Dec 26 06:30:07 CST 2019

Some applications pass FORMATETC.dwAspect=0 to
IDataObject_[Query]GetData() during drag and drop, which
is not a valid DVASPECT_* value. Tests show that Windows
Explorer completely ignores .dwAspect for CF_HDROP when
it is the drag source, treating all values as
DVASPECT_CONTENT instead. Do the same.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=43368

Signed-off-by: Damjan Jovanovic <damjan.jov at gmail.com>
 dlls/winex11.drv/xdnd.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
-------------- next part --------------
diff --git a/dlls/winex11.drv/xdnd.c b/dlls/winex11.drv/xdnd.c
index 8dc4a5bce2..0cd2ad8892 100644
--- a/dlls/winex11.drv/xdnd.c
+++ b/dlls/winex11.drv/xdnd.c
@@ -827,11 +827,9 @@ static HRESULT WINAPI XDNDDATAOBJECT_QueryGetData(IDataObject *dataObject,
         FIXME("only HGLOBAL medium types supported right now\n");
         return DV_E_TYMED;
-    if (formatEtc->dwAspect != DVASPECT_CONTENT)
-    {
-        FIXME("only the content aspect is supported right now\n");
-        return E_NOTIMPL;
-    }
+    /* Windows Explorer ignores .dwAspect and .lindex for CF_HDROP,
+     * and we have no way to implement them on XDnD anyway, so ignore them too.
+     */
     LIST_FOR_EACH_ENTRY(current, &xdndData, XDNDDATA, entry)

More information about the wine-devel mailing list