From: Jacek Caban jacek@codeweavers.com
--- dlls/winex11.drv/event.c | 9 ++++++++- dlls/winex11.drv/unixlib.h | 1 + dlls/winex11.drv/x11drv.h | 1 - dlls/winex11.drv/xdnd.c | 6 +++++- 4 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c index a02f0340010..729a0a7eab6 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c @@ -1920,6 +1920,13 @@ static void handle_xdnd_drop_event( HWND hwnd, XClientMessageEvent *event ) }
+static void handle_xdnd_leave_event( HWND hwnd, XClientMessageEvent *event ) +{ + UINT type = DND_LEAVE_EVENT; + handle_dnd_event( &type ); +} + + struct client_message_handler { int atom; /* protocol atom */ @@ -1935,7 +1942,7 @@ static const struct client_message_handler client_messages[] = { XATOM_XdndEnter, handle_xdnd_enter_event }, { XATOM_XdndPosition, handle_xdnd_position_event }, { XATOM_XdndDrop, handle_xdnd_drop_event }, - { XATOM_XdndLeave, X11DRV_XDND_LeaveEvent } + { XATOM_XdndLeave, handle_xdnd_leave_event } };
diff --git a/dlls/winex11.drv/unixlib.h b/dlls/winex11.drv/unixlib.h index 41120385e60..537a8e0326a 100644 --- a/dlls/winex11.drv/unixlib.h +++ b/dlls/winex11.drv/unixlib.h @@ -31,6 +31,7 @@ struct format_entry enum dnd_event_type { DND_DROP_EVENT, + DND_LEAVE_EVENT, DND_POSITION_EVENT, };
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index c17dc45594c..69aa69404f4 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -294,7 +294,6 @@ extern BOOL IME_SetCompositionString(DWORD dwIndex, LPCVOID lpComp, DWORD dwReadLen) DECLSPEC_HIDDEN; extern void IME_SetResultString(LPWSTR lpResult, DWORD dwResultlen) DECLSPEC_HIDDEN;
-extern void X11DRV_XDND_LeaveEvent( HWND hWnd, XClientMessageEvent *event ) DECLSPEC_HIDDEN;
extern void handle_dnd_enter_event( struct format_entry *formats, ULONG size ) DECLSPEC_HIDDEN; extern UINT handle_dnd_event( void *params ) DECLSPEC_HIDDEN; diff --git a/dlls/winex11.drv/xdnd.c b/dlls/winex11.drv/xdnd.c index 9de0b60d0cd..8240bbbf5d6 100644 --- a/dlls/winex11.drv/xdnd.c +++ b/dlls/winex11.drv/xdnd.c @@ -342,7 +342,7 @@ static DWORD handle_drop_event( struct dnd_drop_event_params *params ) * * Handle an XdndLeave event. */ -void X11DRV_XDND_LeaveEvent( HWND hWnd, XClientMessageEvent *event ) +static NTSTATUS handle_leave_event(void) { IDropTarget *dropTarget;
@@ -362,6 +362,7 @@ void X11DRV_XDND_LeaveEvent( HWND hWnd, XClientMessageEvent *event ) }
X11DRV_XDND_FreeDragDropOp(); + return 0; }
@@ -736,6 +737,9 @@ UINT handle_dnd_event( void *params ) case DND_DROP_EVENT: return handle_drop_event( params );
+ case DND_LEAVE_EVENT: + return handle_leave_event(); + case DND_POSITION_EVENT: return handle_position_event( params );