PATCH: get_common_ancestor

Marcus Meissner marcus at jet.franken.de
Sun Apr 29 11:59:59 CDT 2001


Hi,

_get_common_ancestor gets sometimes called with hwnd B 0 (not sure why).

Ciao, Marcus

Changelog:
	made checks in _get_common_ancestor a bit stricter to avoid
	XQueryTree XErrors.

Index: event.c
===================================================================
RCS file: /home/wine/wine/windows/x11drv/event.c,v
retrieving revision 1.93
diff -u -r1.93 event.c
--- event.c	2001/04/24 23:28:53	1.93
+++ event.c	2001/04/29 18:01:41
@@ -513,14 +513,14 @@
   
     Window      root, *childrenB;
     unsigned    totalB;
-  
-    do
+
+    while( A != B && A && B )
     {
       TSXQueryTree( display, A, &root, &A, children, total );
       TSXQueryTree( display, B, &root, &B, &childrenB, &totalB );
       if( childrenB ) TSXFree( childrenB );
       if( *children ) TSXFree( *children ), *children = NULL;
-    } while( A != B && A && B );
+    }
 
     if( A && B )
     {




More information about the wine-patches mailing list