[PATCH kdrive/ephyr v3 2/3] ephyr: fix RandR version check in hostx_get_output_geometry()

Laércio de Sousa laerciosousa at sme-mogidascruzes.sp.gov.br
Wed May 25 13:26:54 UTC 2016


Current hostx_get_output_geometry() has a little problem when
checking RandR version, treating e.g. version 2.0 as lower than 1.2.

Signed-off-by: Laércio de Sousa <laerciosousa at sme-mogidascruzes.sp.gov.br>
---
 hw/kdrive/ephyr/hostx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c
index ca3e43f..8eb02b1 100644
--- a/hw/kdrive/ephyr/hostx.c
+++ b/hw/kdrive/ephyr/hostx.c
@@ -262,7 +262,8 @@ hostx_get_output_geometry(const char *output,
         fprintf(stderr, "\nFailed to get RandR version supported by host X server.\n");
         exit(1);
     }
-    else if (version_r->major_version < 1 || version_r->minor_version < 2)
+    else if (version_r->major_version < 1 ||
+             (version_r->major_version == 1 && version_r->minor_version < 2))
     {
         free(version_r);
         fprintf(stderr, "\nHost X server doesn't support RandR 1.2, needed for -output usage.\n");
-- 
2.7.4



More information about the xorg-devel mailing list