Workaround bad Window error in clipboard code

Dominik Strasser dominik.strasser at mchp.siemens.de
Fri Oct 12 02:07:48 CDT 2001


Without the patch below I get BadWindow X11 errors if something is
selected on the X11 side.
This happens at least in MS Word 97.

Changelog:

* windows/x11drv/clipboard.c:
	Dominik Strasser <dominik.strasser at t-online.de>
	Workaround X11 BadWindow error if no parent window is found

-- 
Dominik Strasser	| Phone:  +49 89 636-43691
SIEMENS AG		| Fax:    +49 89 636-42284
CT SE 4			| E-Mail:Dominik.Strasser at mchp.siemens.de
Otto-Hahn-Ring 6	|
D-81739 Muenchen	| Room: 53-263
-------------- next part --------------
Index: windows/x11drv/clipboard.c
===================================================================
RCS file: /home/wine/wine/windows/x11drv/clipboard.c,v
retrieving revision 1.39
diff -u -r1.39 clipboard.c
--- windows/x11drv/clipboard.c	2001/10/08 20:28:36	1.39
+++ windows/x11drv/clipboard.c	2001/10/12 05:44:16
@@ -1060,9 +1060,14 @@
 
     if (!selectionAcquired)
     {
-	XEvent xe;
-        Atom propRequest;
-	Window w = X11DRV_get_whole_window( GetAncestor( hWnd, GA_ROOT ));
+		XEvent xe;
+		Atom propRequest;
+		Window w = X11DRV_get_whole_window( GetAncestor( hWnd, GA_ROOT ));
+		if(!w)
+		{
+			FIXME("No parent win found %p %p\n", hWnd, hWndClipWindow);
+			return FALSE;
+		} 
 
         /* Map the format ID requested to an X selection property.
          * If the format is in the cache, use the atom associated


More information about the wine-patches mailing list