[PATCH] winex11: The correct way to search the target window for drag&drop operations.

John Found johnfound at asm32.info
Thu Apr 18 12:35:23 CDT 2019


On Thu, 18 Apr 2019 12:09:02 -0500
Zebediah Figura <z.figura12 at gmail.com> wrote:

> 
> Really? I'm looking at this test right here:
> 
> <https://source.winehq.org/git/wine.git/blob/refs/heads/master:/dlls/user32/tests/win.c#l9398>
> 

Well, yes, I am wrong about the WindowFromPoint, but still only the first level of the children is checked.

The mentioned test checks exactly this in 3 cases:

1. Main window without child created - main window returned.
2. Main window with single STATIC child created - main window returned. (correct, according to MSDN)
3. Main window with single BUTTON child created - the child returned.

There is no child-in-child cases (and IMHO, should not be).

> And the implementation here:
> 
> <https://source.winehq.org/git/wine.git/blob/refs/heads/master:/dlls/user32/winpos.c#l289>
> 
> and
> 
> <https://source.winehq.org/git/wine.git/blob/refs/heads/master:/server/window.c#l2223>
> 
> That seems to pretty clearly show that WindowFromPoint() will return a
> child window at the given point. Both in Windows and in Wine. Not a
> matter of opinion, really.
> 
> Maybe the tests or the implementation are incomplete, but then we should
> fix that, since it seems otherwise clear that WindowFromPoint() should
> be returning the deepest child.
> 
> 
IMO, the tests and implementations are OK. Windows works this way. 

-- 
John Found <johnfound at asm32.info>



More information about the wine-devel mailing list