x11drv: tidy up desktop_vi
Huw D M Davies
h.davies1 at physics.ox.ac.uk
Fri Sep 23 07:57:37 CDT 2005
Huw Davies <huw at codewavers.com>
Move desktop_vi inside process_attach and remember to free it.
--
Huw Davies
huw at codeweavers.com
Index: dlls/x11drv/x11drv_main.c
===================================================================
RCS file: /home/wine/wine/dlls/x11drv/x11drv_main.c,v
retrieving revision 1.111
diff -u -p -r1.111 x11drv_main.c
--- dlls/x11drv/x11drv_main.c 9 Sep 2005 10:19:44 -0000 1.111
+++ dlls/x11drv/x11drv_main.c 23 Sep 2005 12:55:40 -0000
@@ -89,7 +89,6 @@ DWORD thread_data_tls_index = TLS_OUT_OF
static BOOL synchronous; /* run in synchronous mode? */
static BOOL desktop_dbl_buf = TRUE;
static char *desktop_geometry;
-static XVisualInfo *desktop_vi;
static x11drv_error_callback err_callback; /* current callback for error */
static Display *err_callback_display; /* display callback is set for */
@@ -374,6 +373,7 @@ static void setup_options(void)
static BOOL process_attach(void)
{
Display *display;
+ XVisualInfo *desktop_vi = NULL;
setup_options();
@@ -429,6 +429,8 @@ static BOOL process_attach(void)
root_window = X11DRV_create_desktop( desktop_vi, desktop_geometry );
using_wine_desktop = 1;
}
+ if(desktop_vi)
+ XFree(desktop_vi);
#ifdef HAVE_LIBXXF86VM
/* initialize XVidMode */
More information about the wine-patches
mailing list