summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2019-03-03 11:22:22 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2019-03-03 11:22:22 -0800
commit4fc3902a090c8ed2aff11d6e8a2c0df600d69966 (patch)
tree19c61d30a7c305bb3afe908504b365e421d14516
parentae5c4a040680b3889c8ea332c21d2caea2d918d1 (diff)
Only check for XFree86 if vendor string doesn't match X.Org
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--xdpyinfo.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/xdpyinfo.c b/xdpyinfo.c
index 152e32c..b9ddeb1 100644
--- a/xdpyinfo.c
+++ b/xdpyinfo.c
@@ -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;