From fd4dbf0519c3b6126fdc906934d2eee5f825e32f Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Mon, 21 Dec 2015 11:21:18 +0100 Subject: [PATCH] winex11.drv: Call DragLeave instead of Drop if DROPEFFECT_NONE was set. Signed-off-by: Piotr Caban Signed-off-by: Alexandre Julliard --- dlls/winex11.drv/xdnd.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dlls/winex11.drv/xdnd.c b/dlls/winex11.drv/xdnd.c index b0667515269..d5881ade210 100644 --- a/dlls/winex11.drv/xdnd.c +++ b/dlls/winex11.drv/xdnd.c @@ -386,7 +386,7 @@ void X11DRV_XDND_DropEvent( HWND hWnd, XClientMessageEvent *event ) if (XDNDAccepted) { dropTarget = get_droptarget_pointer(XDNDLastDropTargetWnd); - if (dropTarget) + if (dropTarget && effect!=DROPEFFECT_NONE) { HRESULT hr; POINTL pointl; @@ -415,6 +415,13 @@ void X11DRV_XDND_DropEvent( HWND hWnd, XClientMessageEvent *event ) } IDropTarget_Release(dropTarget); } + else if (dropTarget) + { + HRESULT hr = IDropTarget_DragLeave(dropTarget); + if (FAILED(hr)) + WARN("IDropTarget_DragLeave failed, error 0x%08X\n", hr); + IDropTarget_Release(dropTarget); + } } if (drop_file)