[PATCH] winex11.drv: Don't free cached DnD data after informing an application about the drop event.

Dmitry Timoshkov dmitry at baikal.ru
Fri Jul 9 08:56:40 CDT 2021


If an application in its IDropTarget::Drop() implementation saves the passed in
IDataObject and later calls IDataObject::GetData() it fails because global cached
data is no longer available. Another solution is to create a copy of global data
and save it inside of IDataObject, but since all data including item contents is
global anyway this doesn't seem worth the trouble. Global cahed data will be freed
in next X11DRV_XDND_EnterEvent().

Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
---
 dlls/winex11.drv/xdnd.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/dlls/winex11.drv/xdnd.c b/dlls/winex11.drv/xdnd.c
index 0cd2ad88924..9472d9966bb 100644
--- a/dlls/winex11.drv/xdnd.c
+++ b/dlls/winex11.drv/xdnd.c
@@ -476,8 +476,6 @@ void X11DRV_XDND_DropEvent( HWND hWnd, XClientMessageEvent *event )
     TRACE("effectRequested(0x%x) accept(%d) performed(0x%x) at x(%d),y(%d)\n",
           XDNDDropEffect, accept, effect, XDNDxy.x, XDNDxy.y);
 
-    X11DRV_XDND_FreeDragDropOp();
-
     /* Tell the target we are finished. */
     memset(&e, 0, sizeof(e));
     e.type = ClientMessage;
-- 
2.31.1




More information about the wine-devel mailing list