winex11: When re-creating a client window check the new visual against the current one instead of the default one.
This commit is contained in:
parent
8354e6a93a
commit
30a133fe00
|
@ -257,6 +257,7 @@ static Window create_client_window( Display *display, struct x11drv_win_data *da
|
||||||
int cx, cy, mask;
|
int cx, cy, mask;
|
||||||
XSetWindowAttributes attr;
|
XSetWindowAttributes attr;
|
||||||
Window client;
|
Window client;
|
||||||
|
Visual *client_visual = vis ? vis->visual : visual;
|
||||||
|
|
||||||
attr.bit_gravity = NorthWestGravity;
|
attr.bit_gravity = NorthWestGravity;
|
||||||
attr.win_gravity = NorthWestGravity;
|
attr.win_gravity = NorthWestGravity;
|
||||||
|
@ -282,7 +283,7 @@ static Window create_client_window( Display *display, struct x11drv_win_data *da
|
||||||
data->client_rect.left - data->whole_rect.left,
|
data->client_rect.left - data->whole_rect.left,
|
||||||
data->client_rect.top - data->whole_rect.top,
|
data->client_rect.top - data->whole_rect.top,
|
||||||
cx, cy, 0, screen_depth, InputOutput,
|
cx, cy, 0, screen_depth, InputOutput,
|
||||||
vis ? vis->visual : visual, mask, &attr );
|
client_visual, mask, &attr );
|
||||||
if (!client)
|
if (!client)
|
||||||
{
|
{
|
||||||
wine_tsx11_unlock();
|
wine_tsx11_unlock();
|
||||||
|
@ -297,6 +298,7 @@ static Window create_client_window( Display *display, struct x11drv_win_data *da
|
||||||
XDestroyWindow( display, data->client_window );
|
XDestroyWindow( display, data->client_window );
|
||||||
}
|
}
|
||||||
data->client_window = client;
|
data->client_window = client;
|
||||||
|
data->visualid = XVisualIDFromVisual( client_visual );
|
||||||
|
|
||||||
if (data->colormap) XFreeColormap( display, data->colormap );
|
if (data->colormap) XFreeColormap( display, data->colormap );
|
||||||
data->colormap = vis ? attr.colormap : 0;
|
data->colormap = vis ? attr.colormap : 0;
|
||||||
|
@ -431,7 +433,7 @@ BOOL X11DRV_set_win_format( HWND hwnd, XID fbconfig_id )
|
||||||
Display *display = thread_display();
|
Display *display = thread_display();
|
||||||
Window client = data->client_window;
|
Window client = data->client_window;
|
||||||
|
|
||||||
if (vis->visualid != XVisualIDFromVisual(visual))
|
if (vis->visualid != data->visualid)
|
||||||
{
|
{
|
||||||
client = create_client_window( display, data, vis );
|
client = create_client_window( display, data, vis );
|
||||||
TRACE( "re-created client window %lx for %p fbconfig %lx\n", client, data->hwnd, fbconfig_id );
|
TRACE( "re-created client window %lx for %p fbconfig %lx\n", client, data->hwnd, fbconfig_id );
|
||||||
|
|
|
@ -677,6 +677,7 @@ struct x11drv_win_data
|
||||||
Window client_window; /* X window for the client area */
|
Window client_window; /* X window for the client area */
|
||||||
Window icon_window; /* X window for the icon */
|
Window icon_window; /* X window for the icon */
|
||||||
Colormap colormap; /* Colormap for this window */
|
Colormap colormap; /* Colormap for this window */
|
||||||
|
VisualID visualid; /* visual id of the client window */
|
||||||
XID fbconfig_id; /* fbconfig id for the GL drawable this hwnd uses */
|
XID fbconfig_id; /* fbconfig id for the GL drawable this hwnd uses */
|
||||||
Drawable gl_drawable; /* Optional GL drawable for rendering the client area */
|
Drawable gl_drawable; /* Optional GL drawable for rendering the client area */
|
||||||
Pixmap pixmap; /* Base pixmap for if gl_drawable is a GLXPixmap */
|
Pixmap pixmap; /* Base pixmap for if gl_drawable is a GLXPixmap */
|
||||||
|
|
Loading…
Reference in New Issue