mirror of
https://github.com/gnustep/libs-back.git
synced 2025-02-23 20:01:22 +00:00
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:
parent
cff8d92b5f
commit
a1859fe2d5
2 changed files with 22 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -186,10 +186,26 @@ LRESULT CALLBACK MainWndProc(HWND hwnd, UINT uMsg,
|
|||
hwnd = WindowFromPoint(p);
|
||||
if ((int)hwnd == win)
|
||||
{
|
||||
/*
|
||||
* 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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue