Commit 1a200508 authored by Damjan Jovanovic's avatar Damjan Jovanovic Committed by Alexandre Julliard

winex11.drv: Support XDnD version 5.

parent 4c8b3f63
......@@ -61,7 +61,7 @@ typedef int Status;
#define MAX_DASHLEN 16
#define WINE_XDND_VERSION 4
#define WINE_XDND_VERSION 5
/* X physical pen */
typedef struct
......
......@@ -373,6 +373,8 @@ void X11DRV_XDND_DropEvent( HWND hWnd, XClientMessageEvent *event )
{
XClientMessageEvent e;
IDropTarget *dropTarget;
DWORD effect = XDNDDropEffect;
int accept = 0; /* Assume we're not accepting */
TRACE("\n");
......@@ -386,7 +388,6 @@ void X11DRV_XDND_DropEvent( HWND hWnd, XClientMessageEvent *event )
{
HRESULT hr;
POINTL pointl;
DWORD effect = XDNDDropEffect;
pointl.x = XDNDxy.x;
pointl.y = XDNDxy.y;
......@@ -395,7 +396,10 @@ void X11DRV_XDND_DropEvent( HWND hWnd, XClientMessageEvent *event )
if (SUCCEEDED(hr))
{
if (effect != DROPEFFECT_NONE)
{
TRACE("drop succeeded\n");
accept = 1;
}
else
TRACE("the application refused the drop\n");
}
......@@ -414,6 +418,11 @@ void X11DRV_XDND_DropEvent( HWND hWnd, XClientMessageEvent *event )
e.message_type = x11drv_atom(XdndFinished);
e.format = 32;
e.data.l[0] = event->window;
e.data.l[1] = accept;
if (accept)
e.data.l[2] = X11DRV_XDND_DROPEFFECTToXdndAction(effect);
else
e.data.l[2] = None;
XSendEvent(event->display, event->data.l[0], False, NoEventMask, (XEvent*)&e);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment