summaryrefslogtreecommitdiff
path: root/Xi
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-09-18 16:27:54 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-09-21 21:47:35 +1000
commit55747d256d759850141e4a9c4dec965616a31dc8 (patch)
treeb9f140d3bbca93f3028cf2340271789fd1d92e6d /Xi
parent0b7c6c728c2e2d8433a188315cc591308a89cd85 (diff)
input: define server-supported protocol versions in one single file.
include/protocol-versions.h specifies each extension version as supported by the server and sent back on the wire to the client. This fixes up several issues with the server potentially reporting a higher version of the protocol if recompiled against a newer version of the protocol. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: RĂ©mi Cardona <remi@gentoo.org> Acked-by: Julien Cristau <jcristau@debian.org>
Diffstat (limited to 'Xi')
-rw-r--r--Xi/extinit.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Xi/extinit.c b/Xi/extinit.c
index 84b999c0c..0c1291903 100644
--- a/Xi/extinit.c
+++ b/Xi/extinit.c
@@ -72,6 +72,7 @@ SOFTWARE.
#include "swaprep.h"
#include "registry.h"
#include "privates.h"
+#include "protocol-versions.h"
/* modules local to Xi */
#include "allowev.h"
@@ -380,11 +381,6 @@ Mask PropagateMask[MAXDEVICES];
static int XIClientPrivateKeyIndex;
DevPrivateKey XIClientPrivateKey = &XIClientPrivateKeyIndex;
-static XExtensionVersion thisversion = { XI_Present,
- XI_2_Major,
- XI_2_Minor
-};
-
/*****************************************************************
*
@@ -1255,6 +1251,10 @@ void
XInputExtensionInit(void)
{
ExtensionEntry *extEntry;
+ XExtensionVersion thisversion = { XI_Present,
+ SERVER_XI_MAJOR_VERSION,
+ SERVER_XI_MINOR_VERSION,
+ };
if (!dixRequestPrivate(XIClientPrivateKey, sizeof(XIClientRec)))
FatalError("Cannot request private for XI.\n");