winex11: Use the correct colormap for the OpenGL parent window.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2018-01-26 13:35:38 +01:00
parent f54a661767
commit d6332e0e57
1 changed files with 5 additions and 2 deletions

View File

@ -1370,10 +1370,13 @@ static BOOL create_gl_drawable( HWND hwnd, struct gl_drawable *gl )
XSetWindowAttributes attrib;
attrib.override_redirect = True;
attrib.border_pixel = 0;
if (!dummy_parent)
{
attrib.colormap = default_colormap;
dummy_parent = XCreateWindow( gdi_display, root_window, -1, -1, 1, 1, 0, default_visual.depth,
InputOutput, default_visual.visual, CWOverrideRedirect, &attrib );
InputOutput, default_visual.visual,
CWColormap | CWBorderPixel | CWOverrideRedirect, &attrib );
XMapWindow( gdi_display, dummy_parent );
}
gl->colormap = XCreateColormap(gdi_display, dummy_parent, gl->visual->visual,
@ -1388,7 +1391,7 @@ static BOOL create_gl_drawable( HWND hwnd, struct gl_drawable *gl )
gl->window = XCreateWindow( gdi_display, dummy_parent, 0, 0,
gl->rect.right - gl->rect.left, gl->rect.bottom - gl->rect.top,
0, gl->visual->depth, InputOutput, gl->visual->visual,
CWColormap | CWOverrideRedirect, &attrib );
CWColormap | CWBorderPixel | CWOverrideRedirect, &attrib );
if (gl->window)
{
gl->drawable = pglXCreateWindow( gdi_display, gl->format->fbconfig, gl->window, NULL );