Commit aaac4e25 authored by Akihiro Sagawa's avatar Akihiro Sagawa Committed by Alexandre Julliard

winex11.drv: Indicate whether the drop point is non-client area.

parent 424e1e71
...@@ -636,12 +636,15 @@ static HRESULT X11DRV_XDND_SendDropFiles(HWND hwnd) ...@@ -636,12 +636,15 @@ static HRESULT X11DRV_XDND_SendDropFiles(HWND hwnd)
HGLOBAL dropHandle = GlobalAlloc(GMEM_FIXED, GlobalSize(current->contents)); HGLOBAL dropHandle = GlobalAlloc(GMEM_FIXED, GlobalSize(current->contents));
if (dropHandle) if (dropHandle)
{ {
RECT rect;
DROPFILES *lpDrop = GlobalLock(dropHandle); DROPFILES *lpDrop = GlobalLock(dropHandle);
memcpy(lpDrop, GlobalLock(current->contents), GlobalSize(current->contents)); memcpy(lpDrop, GlobalLock(current->contents), GlobalSize(current->contents));
GlobalUnlock(current->contents); GlobalUnlock(current->contents);
lpDrop->pt.x = XDNDxy.x; lpDrop->pt.x = XDNDxy.x;
lpDrop->pt.y = XDNDxy.y; lpDrop->pt.y = XDNDxy.y;
lpDrop->fNC = !ScreenToClient(hwnd, &lpDrop->pt); lpDrop->fNC = !(ScreenToClient(hwnd, &lpDrop->pt) &&
GetClientRect(hwnd, &rect) &&
PtInRect(&rect, lpDrop->pt));
TRACE("Sending WM_DROPFILES: hWnd=0x%p, fNC=%d, x=%d, y=%d, files=%p(%s)\n", hwnd, TRACE("Sending WM_DROPFILES: hWnd=0x%p, fNC=%d, x=%d, y=%d, files=%p(%s)\n", hwnd,
lpDrop->fNC, lpDrop->pt.x, lpDrop->pt.y, ((char*)lpDrop) + lpDrop->pFiles, lpDrop->fNC, lpDrop->pt.x, lpDrop->pt.y, ((char*)lpDrop) + lpDrop->pFiles,
debugstr_w((WCHAR*)(((char*)lpDrop) + lpDrop->pFiles))); debugstr_w((WCHAR*)(((char*)lpDrop) + lpDrop->pFiles)));
......
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