libs: x11: allows 30-bit colour depth

The colour depth is clamped to 24 when it is not equal {15,16,24,32}. But this
fails with the NVIDIA binary driver as it doesn't advertise a TrueColor visual
with a depth of 24 (only 30 and 32). Allowing the depth to be 30, lets everything
work as expected.

https://bugzilla.gnome.org/show_bug.cgi?id=764256
This commit is contained in:
Stephen 2016-03-27 09:11:00 +00:00 committed by Víctor Manuel Jáquez Leal
parent ddddb0415b
commit b64eaaad4d

View file

@ -90,7 +90,7 @@ x11_create_window (Display * dpy, guint w, guint h, guint vid, Colormap cmap)
XGetWindowAttributes (dpy, rootwin, &wattr);
depth = wattr.depth;
if (depth != 15 && depth != 16 && depth != 24 && depth != 32)
if (depth != 15 && depth != 16 && depth != 24 && depth != 30 && depth != 32)
depth = 24;
xswa_mask = CWBorderPixel | CWBackPixel;