diff options
author | Julien Cristau <jcristau@debian.org> | 2011-05-31 16:04:20 +0200 |
---|---|---|
committer | Julien Cristau <jcristau@debian.org> | 2011-09-03 17:12:20 +0200 |
commit | 950a9802bd3d8c428a643cd0e43d12b9f5a633a6 (patch) | |
tree | 25e9d5e7eee7bd767135ab6dbe2f7ec61387c305 | |
parent | 009bd4d693219b36ac83e0ce0e57ed0e0897b1fb (diff) |
glx: suppress BadRequest from DRI2Connect (which is expected for non-local clients).
-rw-r--r-- | debian/changelog | 7 | ||||
-rw-r--r-- | debian/patches/08_glx-ignore-BadRequest-errors-from-DRI2Connect.diff | 54 | ||||
-rw-r--r-- | debian/patches/series | 1 |
3 files changed, 62 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 1a3404470e2..ab1f23825bb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +mesa (7.7.1-5) UNRELEASED; urgency=low + + * glx: suppress BadRequest from DRI2Connect (which is expected for non-local + clients). + + -- Julien Cristau <jcristau@debian.org> Tue, 31 May 2011 15:08:18 +0200 + mesa (7.7.1-4) unstable; urgency=low [ Brice Goglin ] diff --git a/debian/patches/08_glx-ignore-BadRequest-errors-from-DRI2Connect.diff b/debian/patches/08_glx-ignore-BadRequest-errors-from-DRI2Connect.diff new file mode 100644 index 00000000000..ab0f6701c55 --- /dev/null +++ b/debian/patches/08_glx-ignore-BadRequest-errors-from-DRI2Connect.diff @@ -0,0 +1,54 @@ +From 46f568ec04eacb500f4057c31453b5e80b4e8aaf Mon Sep 17 00:00:00 2001 +From: Julien Cristau <jcristau@debian.org> +Date: Tue, 31 May 2011 16:02:21 +0200 +Subject: [PATCH] glx: ignore BadRequest errors from DRI2Connect + +They are expected for non-local clients. +--- + src/glx/x11/dri2.c | 14 +++++++++++++- + 1 files changed, 13 insertions(+), 1 deletions(-) + +Index: mesa/src/glx/x11/dri2.c +=================================================================== +--- mesa.orig/src/glx/x11/dri2.c ++++ mesa/src/glx/x11/dri2.c +@@ -54,6 +54,8 @@ + static char dri2ExtensionName[] = DRI2_NAME; + static XExtensionInfo *dri2Info; + static XEXT_GENERATE_CLOSE_DISPLAY (DRI2CloseDisplay, dri2Info) ++static int ++DRI2Error(Display *dpy, xError *err, XExtCodes *codes, int *ret_code); + + static /* const */ XExtensionHooks dri2ExtensionHooks = { + NULL, /* create_gc */ +@@ -65,7 +67,7 @@ static /* const */ XExtensionHooks dri2E + DRI2CloseDisplay, /* close_display */ + NULL, /* wire_to_event */ + NULL, /* event_to_wire */ +- NULL, /* error */ ++ DRI2Error, /* error */ + NULL, /* error_string */ + }; + +@@ -75,6 +77,21 @@ static XEXT_GENERATE_FIND_DISPLAY (DRI2F + &dri2ExtensionHooks, + 0, NULL) + ++static int ++DRI2Error(Display *dpy, xError *err, XExtCodes *codes, int *ret_code) ++{ ++ /* If the server is non-local DRI2Connect will raise BadRequest ++ * Swallow this so that DRI2Connect can signal this in its return code */ ++ if (err->majorCode == codes->major_opcode && ++ err->errorCode == BadRequest && ++ err->minorCode == X_DRI2Connect) { ++ *ret_code = False; ++ return True; ++ } ++ ++ return False; ++} ++ + Bool + DRI2QueryExtension(Display * dpy, int *eventBase, int *errorBase) + { diff --git a/debian/patches/series b/debian/patches/series index 8cf687d3747..e27ab8612fc 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -4,3 +4,4 @@ 05_hurd-ftbfs.diff 06_kfreebsd-ftbfs.diff 07_fix_i915_dri1.patch +08_glx-ignore-BadRequest-errors-from-DRI2Connect.diff |