summaryrefslogtreecommitdiff
path: root/Xext/geext.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2008-04-24 11:27:22 +0930
committerPeter Hutterer <peter@cs.unisa.edu.au>2008-04-24 11:27:22 +0930
commit745b90cde1007383ec8c887f02439a34ab427f31 (patch)
tree2acca0e5f66ca0664cbd46b68b62e9fed58c2701 /Xext/geext.c
parent5f3e5b3462bb02e828c70d0e1890b5a83d399d42 (diff)
Xext: re-do the XGE versioning handling.
Basically the same approach RandR takes. Remember which one the client requested, send back the one the server supports. Also divide XGE server version (now defined in geext.c) and the client's version (still in the protocol definition).
Diffstat (limited to 'Xext/geext.c')
-rw-r--r--Xext/geext.c33
1 files changed, 18 insertions, 15 deletions
diff --git a/Xext/geext.c b/Xext/geext.c
index 83473226f..c6c871390 100644
--- a/Xext/geext.c
+++ b/Xext/geext.c
@@ -1,4 +1,4 @@
-/*
+/*
Copyright 2007 Peter Hutterer <peter@cs.unisa.edu.au>
@@ -36,6 +36,11 @@ from the author.
#include "geint.h"
#include "geext.h"
+/* Currently supported XGE version */
+#define SERVER_GE_MAJOR 1
+#define SERVER_GE_MINOR 0
+
+
int GEEventBase;
int GEErrorBase;
DevPrivateKey GEClientPrivateKey = &GEClientPrivateKey;
@@ -73,20 +78,13 @@ static int ProcGEQueryVersion(ClientPtr client)
rep.length = 0;
rep.sequenceNumber = client->sequence;
- if (stuff->majorVersion < GE_MAJOR) {
- rep.majorVersion = stuff->majorVersion;
- rep.minorVersion = stuff->minorVersion;
- } else {
- rep.majorVersion = GE_MAJOR;
- if (stuff->majorVersion == GE_MAJOR &&
- stuff->minorVersion < GE_MINOR)
- rep.minorVersion = stuff->minorVersion;
- else
- rep.minorVersion = GE_MINOR;
- }
+ /* return the supported version by the server */
+ rep.majorVersion = SERVER_GE_MAJOR;
+ rep.minorVersion = SERVER_GE_MINOR;
- pGEClient->major_version = rep.majorVersion;
- pGEClient->minor_version = rep.minorVersion;
+ /* Remember version the client requested */
+ pGEClient->major_version = stuff->majorVersion;
+ pGEClient->minor_version = stuff->minorVersion;
if (client->swapped)
{
@@ -156,7 +154,12 @@ SProcGEDispatch(ClientPtr client)
return (*SProcGEVector[stuff->ReqType])(client);
}
-/* new client callback */
+/**
+ * Called when a new client inits a connection to the X server.
+ *
+ * We alloc a simple struct to store the client's major/minor version. Can be
+ * used in the furture for versioning support.
+ */
static void GEClientCallback(CallbackListPtr *list,
pointer closure,
pointer data)