winex11: Create a dummy parent window for composite child windows to avoid using the root.
This commit is contained in:
parent
6e9dea8a27
commit
b605980bf1
|
@ -454,21 +454,26 @@ BOOL X11DRV_set_win_format( HWND hwnd, XID fbconfig_id )
|
||||||
if(usexcomposite)
|
if(usexcomposite)
|
||||||
{
|
{
|
||||||
XSetWindowAttributes attrib;
|
XSetWindowAttributes attrib;
|
||||||
Window parent = X11DRV_get_whole_window( GetAncestor( hwnd, GA_ROOT ));
|
static Window dummy_parent;
|
||||||
|
|
||||||
if (!parent) parent = root_window;
|
|
||||||
wine_tsx11_lock();
|
wine_tsx11_lock();
|
||||||
data->colormap = XCreateColormap(gdi_display, parent, vis->visual,
|
attrib.override_redirect = True;
|
||||||
|
if (!dummy_parent)
|
||||||
|
{
|
||||||
|
dummy_parent = XCreateWindow( gdi_display, root_window, -1, -1, 1, 1, 0, screen_depth,
|
||||||
|
InputOutput, visual, CWOverrideRedirect, &attrib );
|
||||||
|
XMapWindow( gdi_display, dummy_parent );
|
||||||
|
}
|
||||||
|
data->colormap = XCreateColormap(gdi_display, dummy_parent, vis->visual,
|
||||||
(vis->class == PseudoColor ||
|
(vis->class == PseudoColor ||
|
||||||
vis->class == GrayScale ||
|
vis->class == GrayScale ||
|
||||||
vis->class == DirectColor) ?
|
vis->class == DirectColor) ?
|
||||||
AllocAll : AllocNone);
|
AllocAll : AllocNone);
|
||||||
attrib.override_redirect = True;
|
|
||||||
attrib.colormap = data->colormap;
|
attrib.colormap = data->colormap;
|
||||||
XInstallColormap(gdi_display, attrib.colormap);
|
XInstallColormap(gdi_display, attrib.colormap);
|
||||||
|
|
||||||
if(data->gl_drawable) XDestroyWindow(gdi_display, data->gl_drawable);
|
if(data->gl_drawable) XDestroyWindow(gdi_display, data->gl_drawable);
|
||||||
data->gl_drawable = XCreateWindow(gdi_display, parent, -w, 0, w, h, 0,
|
data->gl_drawable = XCreateWindow(gdi_display, dummy_parent, -w, 0, w, h, 0,
|
||||||
vis->depth, InputOutput, vis->visual,
|
vis->depth, InputOutput, vis->visual,
|
||||||
CWColormap | CWOverrideRedirect,
|
CWColormap | CWOverrideRedirect,
|
||||||
&attrib);
|
&attrib);
|
||||||
|
|
Loading…
Reference in New Issue