[PATCH 2/2] winex11.drv: Clean up client window pointer when destroying GL drawable
Andrew Eikum
aeikum at codeweavers.com
Wed Jun 13 10:00:41 CDT 2018
Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
---
dlls/winex11.drv/opengl.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c
index 7aa6448fed..8e74ad4114 100644
--- a/dlls/winex11.drv/opengl.c
+++ b/dlls/winex11.drv/opengl.c
@@ -242,6 +242,7 @@ struct gl_drawable
LONG ref; /* reference count */
enum dc_gl_type type; /* type of GL surface */
GLXDrawable drawable; /* drawable for rendering with GL */
+ HWND hwnd;
Window window; /* window if drawable is a GLXWindow */
Pixmap pixmap; /* base pixmap if drawable is a GLXPixmap */
const struct wgl_pixel_format *format; /* pixel format for the drawable */
@@ -1207,9 +1208,9 @@ static void release_gl_drawable( struct gl_drawable *gl )
{
case DC_GL_WINDOW:
case DC_GL_CHILD_WIN:
- TRACE( "destroying %lx drawable %lx\n", gl->window, gl->drawable );
+ TRACE( "destroying %p/%lx drawable %lx\n", gl->hwnd, gl->window, gl->drawable );
pglXDestroyWindow( gdi_display, gl->drawable );
- XDestroyWindow( gdi_display, gl->window );
+ destroy_client_window( gl->hwnd );
break;
case DC_GL_PIXMAP_WIN:
TRACE( "destroying pixmap %lx drawable %lx\n", gl->pixmap, gl->drawable );
@@ -1370,6 +1371,7 @@ static struct gl_drawable *create_gl_drawable( HWND hwnd, const struct wgl_pixel
gl->refresh_swap_interval = TRUE;
gl->format = format;
gl->ref = 1;
+ gl->hwnd = hwnd;
if (GetAncestor( hwnd, GA_PARENT ) == GetDesktopWindow()) /* top-level window */
{
--
2.17.1
More information about the wine-devel
mailing list