winex11.drv: Don't call IDropTarget::{DragOver,DragLeave,Drop} functions if DragEnter fails.
Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
701bb45203
commit
a19fe8d9c8
|
@ -285,7 +285,7 @@ void X11DRV_XDND_PositionEvent( HWND hWnd, XClientMessageEvent *event )
|
|||
/* Notify OLE of DragEnter. Result determines if we accept */
|
||||
HWND dropTargetWindow;
|
||||
|
||||
if (XDNDLastDropTargetWnd)
|
||||
if (XDNDAccepted && XDNDLastDropTargetWnd)
|
||||
{
|
||||
dropTarget = get_droptarget_pointer(XDNDLastDropTargetWnd);
|
||||
if (dropTarget)
|
||||
|
@ -387,6 +387,8 @@ void X11DRV_XDND_DropEvent( HWND hWnd, XClientMessageEvent *event )
|
|||
TRACE("\n");
|
||||
|
||||
/* Notify OLE of Drop */
|
||||
if (XDNDAccepted)
|
||||
{
|
||||
dropTarget = get_droptarget_pointer(XDNDLastDropTargetWnd);
|
||||
if (dropTarget)
|
||||
{
|
||||
|
@ -417,6 +419,7 @@ void X11DRV_XDND_DropEvent( HWND hWnd, XClientMessageEvent *event )
|
|||
}
|
||||
IDropTarget_Release(dropTarget);
|
||||
}
|
||||
}
|
||||
|
||||
if (drop_file)
|
||||
{
|
||||
|
@ -465,6 +468,8 @@ void X11DRV_XDND_LeaveEvent( HWND hWnd, XClientMessageEvent *event )
|
|||
TRACE("DND Operation canceled\n");
|
||||
|
||||
/* Notify OLE of DragLeave */
|
||||
if (XDNDAccepted)
|
||||
{
|
||||
dropTarget = get_droptarget_pointer(XDNDLastDropTargetWnd);
|
||||
if (dropTarget)
|
||||
{
|
||||
|
@ -473,6 +478,7 @@ void X11DRV_XDND_LeaveEvent( HWND hWnd, XClientMessageEvent *event )
|
|||
WARN("IDropTarget_DragLeave failed, error 0x%08X\n", hr);
|
||||
IDropTarget_Release(dropTarget);
|
||||
}
|
||||
}
|
||||
|
||||
X11DRV_XDND_FreeDragDropOp();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue