dix: don't refuse creating windows with different color depths and w/o border

XServer refuses the create windows with different color depth than the parent's,
just in the special case that neither border pixmap nor border pixel is given,
even if the screen supports it. (that's also one of the reasons why Xnest fails
to run with different color depths than the default one)

it really doesn't make sense to deny this, while it's allowed when having a
border color or pixmap set.

Fixes: ded6147b - R6.6 is the Xorg base-line
Closes:https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1644
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2024-08-15 13:36:27 +02:00
parent e439636c39
commit 8124a0dc68

View File

@ -802,12 +802,6 @@ dixCreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w,
}
}
if (((vmask & (CWBorderPixmap | CWBorderPixel)) == 0) &&
(class != InputOnly) && (depth != pParent->drawable.depth)) {
*error = BadMatch;
return NullWindow;
}
if (((vmask & CWColormap) == 0) &&
(class != InputOnly) &&
((visual != ancwopt->visual) || (ancwopt->colormap == None))) {