diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2019-03-03 11:22:22 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2019-03-03 11:22:22 -0800 |
commit | 4fc3902a090c8ed2aff11d6e8a2c0df600d69966 (patch) | |
tree | 19c61d30a7c305bb3afe908504b365e421d14516 /xdpyinfo.c | |
parent | ae5c4a040680b3889c8ea332c21d2caea2d918d1 (diff) |
Only check for XFree86 if vendor string doesn't match X.Org
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'xdpyinfo.c')
-rw-r--r-- | xdpyinfo.c | 25 |
1 files changed, 12 insertions, 13 deletions
@@ -239,7 +239,18 @@ print_display_info(Display *dpy) printf ("vendor string: %s\n", ServerVendor (dpy)); printf ("vendor release number: %d\n", VendorRelease (dpy)); - if (strstr(ServerVendor (dpy), "XFree86")) { + 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); + printf("\n"); + } + else if (strstr(ServerVendor (dpy), "XFree86")) { int vendrel = VendorRelease(dpy); printf("XFree86 version: "); @@ -280,18 +291,6 @@ print_display_info(Display *dpy) printf("\n"); } - 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); - printf("\n"); - } - if (strstr(ServerVendor (dpy), "DMX")) { int vendrel = VendorRelease(dpy); int major, minor, year, month, day; |