[cairo-commit] 2 commits - src/cairo-xlib-display.c

Carl Worth cworth at kemper.freedesktop.org
Wed Dec 5 09:28:02 PST 2007


 src/cairo-xlib-display.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit be79779331ee29c0bfb74b728227719bb5dead6e
Author: Carl Worth <cworth at cworth.org>
Date:   Wed Dec 5 09:24:17 2007 -0800

    Restrict initial buggy version to X.Org 6.7 rather than 6.0
    
    Also add some comments describing the test.

diff --git a/src/cairo-xlib-display.c b/src/cairo-xlib-display.c
index 6b389e5..430f1ce 100644
--- a/src/cairo-xlib-display.c
+++ b/src/cairo-xlib-display.c
@@ -292,7 +292,14 @@ _cairo_xlib_display_get (Display *dpy)
 
     display->buggy_repeat = FALSE;
     if (strstr (ServerVendor (dpy), "X.Org") != NULL) {
-	if (VendorRelease (dpy) >= 60000000 && VendorRelease (dpy) <= 60802000)
+	/* When modularized, the X.Org server VendorRelease was
+	 * bogusly reset to a very small number, without any change in
+	 * the ServerVendor string. We avoid considering the new
+	 * servers with the small number as buggy by restricting the
+	 * test to known bad releases. But there could be a problem
+	 * again in the future if X.Org server versions ever climb
+	 * back up to 6.7 or 6.8. */
+	if (VendorRelease (dpy) >= 60700000 && VendorRelease (dpy) <= 60802000)
 	    display->buggy_repeat = TRUE;
     } else if (strstr (ServerVendor (dpy), "XFree86") != NULL) {
 	if (VendorRelease (dpy) <= 40500000)
commit d4138d1161c6b683fd0ef62a8d49ccf4ec4674bc
Author: Bernardo Innocenti <bernie at codewiz.org>
Date:   Wed Dec 5 07:04:09 2007 -0500

    Fix version check for buggy_repeat on modular Xserver 1.x
    
    The versioning of the X server has restarted from 1.0 in the
    modular build.  So we adjust the text to avoid considering
    the new servers buggy.

diff --git a/src/cairo-xlib-display.c b/src/cairo-xlib-display.c
index efb53ba..6b389e5 100644
--- a/src/cairo-xlib-display.c
+++ b/src/cairo-xlib-display.c
@@ -292,7 +292,7 @@ _cairo_xlib_display_get (Display *dpy)
 
     display->buggy_repeat = FALSE;
     if (strstr (ServerVendor (dpy), "X.Org") != NULL) {
-	if (VendorRelease (dpy) <= 60802000)
+	if (VendorRelease (dpy) >= 60000000 && VendorRelease (dpy) <= 60802000)
 	    display->buggy_repeat = TRUE;
     } else if (strstr (ServerVendor (dpy), "XFree86") != NULL) {
 	if (VendorRelease (dpy) <= 40500000)


More information about the cairo-commit mailing list