Dmitry Timoshkov : winex11.drv: Don't free cached DnD data after informing an application about the drop event.

Alexandre Julliard julliard at winehq.org
Sat Jul 10 16:24:32 CDT 2021


Module: wine
Branch: master
Commit: 230e2d5f79eda245da014862c455003f8c05f13e
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=230e2d5f79eda245da014862c455003f8c05f13e

Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date:   Fri Jul  9 16:56:40 2021 +0300

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

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>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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;




More information about the wine-cvs mailing list