[PATCH] desktop children

Gerard Patel gerard.patel at nerim.net
Tue Jan 8 20:21:36 CST 2002


Windows reparented to the desktop, like in the 'property editor'
of Borland tools (Delphi...) were broken because GetAncestor(GA_ROOT)
is not the equivalent of  the old function WIN_GetTopParent.

The old function could return the desktop handle, while GA_ROOT
never returns it so the following test comparing hwndTop to
GetDesktopWindow() can never succeed..
(and no, using GA_ROOTOWNER is not the correct fix)


ChangeLog:

	* windows/message.c
               Fix the test for activation of desktop children


-------------- next part --------------
Index: windows/message.c
===================================================================
RCS file: /home/wine/wine/windows/message.c,v
retrieving revision 1.131
diff -u -r1.131 message.c
--- windows/message.c	2001/12/06 22:31:18	1.131
+++ windows/message.c	2002/01/08 23:11:38
@@ -500,7 +500,7 @@
 
         /* Activate the window if needed */
 
-        if (msg->hwnd != GetActiveWindow() && hwndTop != GetDesktopWindow())
+        if (msg->hwnd != GetActiveWindow() && GetParent(hwndTop) != GetDesktopWindow())
         {
             LONG ret = SendMessageA( msg->hwnd, WM_MOUSEACTIVATE, hwndTop,
                                      MAKELONG( hittest, raw_message ) );
-------------- next part --------------



More information about the wine-patches mailing list