Fix X crash when running in managed mode

Lionel Ulmer lionel.ulmer at free.fr
Thu Jul 12 15:47:02 CDT 2001


Hi all,

This patch fixes a X crash when running in managed mode. Indeed, the
'create_icon_window' was creating a top-level window using Wine's visual...
And every window using this visual need also to use Wine's colormap.

Another way to fix that would have been to create the icon using the default
visual, NOT the one used by Wine.

Changelog:
 Fix X crash when running in managed mode.

-- 
		 Lionel Ulmer - http://www.bbrox.org/
-------------- next part --------------
Index: wine/dlls/x11drv/window.c
===================================================================
RCS file: /home/wine/wine/dlls/x11drv/window.c,v
retrieving revision 1.14
diff -u -r1.14 window.c
--- wine/dlls/x11drv/window.c	2001/07/12 02:49:31	1.14
+++ wine/dlls/x11drv/window.c	2001/07/12 20:24:52
@@ -191,6 +191,7 @@
                        ButtonPressMask | ButtonReleaseMask);
     attr.bit_gravity = NorthWestGravity;
     attr.backing_store = NotUseful/*WhenMapped*/;
+    attr.colormap      = X11DRV_PALETTE_PaletteXColormap; /* Needed due to our visual */
 
     wine_tsx11_lock();
     data->icon_window = XCreateWindow( display, root_window, 0, 0,
@@ -198,7 +199,7 @@
                                        GetSystemMetrics( SM_CYICON ),
                                        0, screen_depth,
                                        InputOutput, visual,
-                                       CWEventMask | CWBitGravity | CWBackingStore, &attr );
+                                       CWEventMask | CWBitGravity | CWBackingStore | CWColormap, &attr );
     XSaveContext( display, data->icon_window, winContext, (char *)win->hwndSelf );
     wine_tsx11_unlock();
 


More information about the wine-patches mailing list