winex11: Keep track of the window colormap and free it on destroy.
This commit is contained in:
parent
b5511ac6bf
commit
e9307d09a6
|
@ -360,12 +360,13 @@ BOOL X11DRV_set_win_format( HWND hwnd, XID fbconfig_id )
|
|||
{
|
||||
XSetWindowAttributes attrib;
|
||||
|
||||
data->colormap = XCreateColormap(display, parent, vis->visual,
|
||||
(vis->class == PseudoColor ||
|
||||
vis->class == GrayScale ||
|
||||
vis->class == DirectColor) ?
|
||||
AllocAll : AllocNone);
|
||||
attrib.override_redirect = True;
|
||||
attrib.colormap = XCreateColormap(display, parent, vis->visual,
|
||||
(vis->class == PseudoColor ||
|
||||
vis->class == GrayScale ||
|
||||
vis->class == DirectColor) ?
|
||||
AllocAll : AllocNone);
|
||||
attrib.colormap = data->colormap;
|
||||
XInstallColormap(gdi_display, attrib.colormap);
|
||||
|
||||
data->gl_drawable = XCreateWindow(display, parent, -w, 0, w, h, 0,
|
||||
|
@ -1294,6 +1295,13 @@ void X11DRV_DestroyWindow( HWND hwnd )
|
|||
destroy_whole_window( display, data );
|
||||
destroy_icon_window( display, data );
|
||||
|
||||
if (data->colormap)
|
||||
{
|
||||
wine_tsx11_lock();
|
||||
XFreeColormap( display, data->colormap );
|
||||
wine_tsx11_unlock();
|
||||
}
|
||||
|
||||
if (thread_data->last_focus == hwnd) thread_data->last_focus = 0;
|
||||
if (data->hWMIconBitmap) DeleteObject( data->hWMIconBitmap );
|
||||
if (data->hWMIconMask) DeleteObject( data->hWMIconMask);
|
||||
|
|
|
@ -665,6 +665,7 @@ struct x11drv_win_data
|
|||
Window whole_window; /* X window for the complete window */
|
||||
Window client_window; /* X window for the client area */
|
||||
Window icon_window; /* X window for the icon */
|
||||
Colormap colormap; /* Colormap for this window */
|
||||
XID fbconfig_id; /* fbconfig id for the GL drawable this hwnd uses */
|
||||
Drawable gl_drawable; /* Optional GL drawable for rendering the client area */
|
||||
Pixmap pixmap; /* Base pixmap for if gl_drawable is a GLXPixmap */
|
||||
|
|
Loading…
Reference in New Issue