Fix locating window at point for DnD

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@20984 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2005-03-28 07:45:42 +00:00
parent cff8d92b5f
commit a1859fe2d5
2 changed files with 22 additions and 2 deletions

View file

@ -1,3 +1,7 @@
2005-03-28 Richard Frith-Macdonald <rfm@gnu.org>
* Source/win32/WIN32Server.m: fix for locating window at point.
2005-03-21 Adam Fedor <fedor@gnu.org>
* Source/art/blit.m (artcontext_setup_draw_info): Add mail address

View file

@ -186,10 +186,26 @@ LRESULT CALLBACK MainWndProc(HWND hwnd, UINT uMsg,
hwnd = WindowFromPoint(p);
if ((int)hwnd == win)
{
hwnd = GetWindow(hwnd, GW_HWNDNEXT);
/*
* If the winodw at the point we want is excluded,
* we must look through ALL windows at a lower level
* until we find one which contains the same point.
*/
while (hwnd != 0)
{
RECT r;
hwnd = GetWindow(hwnd, GW_HWNDNEXT);
GetWindowRect(hwnd, &r);
if (PtInRect(&r, p))
{
break;
}
}
}
*windowRef = (int)hwnd;
*windowRef = (int)hwnd; // Any windows
return (int)hwnd;
}