summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@neko.keithp.com>2007-07-03 14:43:17 -0700
committerKeith Packard <keithp@neko.keithp.com>2007-07-03 14:43:17 -0700
commit4f88d68bdb90cc7d12170355105b4fd020acd306 (patch)
tree13552c7bfbdd282a8fcc2977c91f8313e2fe279b
parent866f092ca0160a366add01b48ad03438926c4d16 (diff)
Force advertised Composite version to 0.4 instead of using header version.
Installed protocol header version may be newer than the server code base. Use internal version number for Composite extension to make sure the server doesn't advertise capabilities it doesn't support.
-rw-r--r--composite/compext.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/composite/compext.c b/composite/compext.c
index 3a43be352..9cf6bfe2c 100644
--- a/composite/compext.c
+++ b/composite/compext.c
@@ -46,6 +46,9 @@
#include "compint.h"
+#define SERVER_COMPOSITE_MAJOR 0
+#define SERVER_COMPOSITE_MINOR 4
+
static CARD8 CompositeReqCode;
static int CompositeClientPrivateIndex;
RESTYPE CompositeClientWindowType;
@@ -130,16 +133,16 @@ ProcCompositeQueryVersion (ClientPtr client)
rep.type = X_Reply;
rep.length = 0;
rep.sequenceNumber = client->sequence;
- if (stuff->majorVersion < COMPOSITE_MAJOR) {
+ if (stuff->majorVersion < SERVER_COMPOSITE_MAJOR) {
rep.majorVersion = stuff->majorVersion;
rep.minorVersion = stuff->minorVersion;
} else {
- rep.majorVersion = COMPOSITE_MAJOR;
- if (stuff->majorVersion == COMPOSITE_MAJOR &&
- stuff->minorVersion < COMPOSITE_MINOR)
+ rep.majorVersion = SERVER_COMPOSITE_MAJOR;
+ if (stuff->majorVersion == SERVER_COMPOSITE_MAJOR &&
+ stuff->minorVersion < SERVER_COMPOSITE_MINOR)
rep.minorVersion = stuff->minorVersion;
else
- rep.minorVersion = COMPOSITE_MINOR;
+ rep.minorVersion = SERVER_COMPOSITE_MINOR;
}
pCompositeClient->major_version = rep.majorVersion;
pCompositeClient->minor_version = rep.minorVersion;