Commit ace09cf3 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

winex11: Move XdndLeave event handler to event.c.

parent e510f865
......@@ -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 }
};
......
......@@ -31,6 +31,7 @@ struct format_entry
enum dnd_event_type
{
DND_DROP_EVENT,
DND_LEAVE_EVENT,
DND_POSITION_EVENT,
};
......
......@@ -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;
......
......@@ -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 );
......
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