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

winex11: Move x11drv_post_drop to xdnd.c.

parent 7cc4d83f
...@@ -1478,16 +1478,8 @@ static HWND find_drop_window( HWND hQueryWnd, LPPOINT lpPt ) ...@@ -1478,16 +1478,8 @@ static HWND find_drop_window( HWND hQueryWnd, LPPOINT lpPt )
static void post_drop( HWND hwnd, DROPFILES *drop, ULONG size ) static void post_drop( HWND hwnd, DROPFILES *drop, ULONG size )
{ {
HDROP handle; drop->fWide = HandleToUlong( hwnd ); /* abuse fWide to pass window handle */
x11drv_post_drop( drop, size );
if ((handle = GlobalAlloc( GMEM_SHARE, size )))
{
DROPFILES *ptr = GlobalLock( handle );
memcpy( ptr, drop, size );
ptr->fWide = TRUE;
GlobalUnlock( handle );
PostMessageW( hwnd, WM_DROPFILES, (WPARAM)handle, 0 );
}
} }
/********************************************************************** /**********************************************************************
......
...@@ -846,6 +846,8 @@ static inline BOOL is_window_rect_mapped( const RECT *rect ) ...@@ -846,6 +846,8 @@ static inline BOOL is_window_rect_mapped( const RECT *rect )
extern NTSTATUS x11drv_init( void *arg ) DECLSPEC_HIDDEN; extern NTSTATUS x11drv_init( void *arg ) DECLSPEC_HIDDEN;
extern NTSTATUS x11drv_clipboard_message( void *arg ) DECLSPEC_HIDDEN; extern NTSTATUS x11drv_clipboard_message( void *arg ) DECLSPEC_HIDDEN;
extern NTSTATUS WINAPI x11drv_post_drop( void *data, ULONG size ) DECLSPEC_HIDDEN;
/* GDI helpers */ /* GDI helpers */
static inline BOOL lp_to_dp( HDC hdc, POINT *points, INT count ) static inline BOOL lp_to_dp( HDC hdc, POINT *points, INT count )
......
...@@ -748,3 +748,21 @@ UINT handle_dnd_event( void *params ) ...@@ -748,3 +748,21 @@ UINT handle_dnd_event( void *params )
return 0; return 0;
} }
} }
NTSTATUS WINAPI x11drv_post_drop( void *data, ULONG size )
{
HDROP handle;
if ((handle = GlobalAlloc( GMEM_SHARE, size )))
{
DROPFILES *ptr = GlobalLock( handle );
HWND hwnd;
memcpy( ptr, data, size );
hwnd = UlongToHandle( ptr->fWide );
ptr->fWide = TRUE;
GlobalUnlock( handle );
PostMessageW( hwnd, WM_DROPFILES, (WPARAM)handle, 0 );
}
return 0;
}
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