The X.Org X servers report a VendorRelease value that matches
the X.Org version number. There have been some cases of releases where
this value wasn't set correctly. The rules for interpreting this value
as well as the known exceptions are outlined here.
For post-6.7.0 development and release versions using the new numbering
scheme, the VendorRelease value is MMmmPPsss. That
is, version M.m.P.s has VendorRelease set to
M * 10000000 + m * 100000 + P * 1000 + s.
The following is a code fragment taken from xdpyinfo.c that shows
how the VendorRelease information can be interpreted.
if (strstr(ServerVendor(dpy), "X.Org")) {
int vendrel = VendorRelease(dpy);
printf("X.Org version: ");
printf("%d.%d.%d", vendrel / 10000000,
(vendrel / 100000) % 100,
(vendrel / 1000) % 100);
if (vendrel % 1000) {
printf(".%d", vendrel % 1000);
}
}