Ken Thomases : winex11: Don' t leak client window and colormap when pixel format is changed.
Alexandre Julliard
julliard at winehq.org
Tue Mar 11 14:45:40 CDT 2014
Module: wine
Branch: master
Commit: eef81f5ecc27cac8bc2bf4eacdc0934cb7e30c61
URL: http://source.winehq.org/git/wine.git/?a=commit;h=eef81f5ecc27cac8bc2bf4eacdc0934cb7e30c61
Author: Ken Thomases <ken at codeweavers.com>
Date: Mon Mar 10 18:23:13 2014 -0500
winex11: Don't leak client window and colormap when pixel format is changed.
---
dlls/winex11.drv/window.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index 4da361a..2ca5ec2 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -1378,6 +1378,13 @@ Window create_client_window( struct x11drv_win_data *data, const XVisualInfo *vi
int cx = min( max( 1, data->client_rect.right - data->client_rect.left ), 65535 );
int cy = min( max( 1, data->client_rect.bottom - data->client_rect.top ), 65535 );
+ if (data->client_window)
+ {
+ XDeleteContext( data->display, data->client_window, winContext );
+ XDestroyWindow( data->display, data->client_window );
+ }
+
+ if (data->colormap) XFreeColormap( data->display, data->colormap );
data->colormap = XCreateColormap( data->display, root_window, visual->visual,
(visual->class == PseudoColor ||
visual->class == GrayScale ||
More information about the wine-cvs
mailing list