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

Submitted by Laércio de Sousa on May 25, 2016, 1:26 p.m.

Details

Message ID 1464182815-15480-2-git-send-email-laerciosousa@sme-mogidascruzes.sp.gov.br
State New
Headers show
Series "Series without cover letter" ( rev: 1 ) in X.org (DEPRECATED - USE GITLAB)

Not browsing as part of any series.

Commit Message

Laércio de Sousa May 25, 2016, 1:26 p.m.
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@sme-mogidascruzes.sp.gov.br>
---
 hw/kdrive/ephyr/hostx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

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");