summaryrefslogtreecommitdiff
path: root/Xi/xiselectev.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-06-10 14:41:11 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-06-11 13:42:49 +1000
commitaa2babf11c30be4d289b58212dc330b84efb4053 (patch)
tree1a885aac1bee2b9b9dac5e6a717c6f2e01df60e6 /Xi/xiselectev.c
parent77cc816da4a2777110182ed01c22c0f5e6ac3b65 (diff)
input: remove dependency on XI2 protocol for XI_LASTEVENT.
inputstr includes XI2proto.h for the sole purpose of XI_LASTEVENT. However, using XI_LASTEVENT in the server is prone to errors, if the server is recompiled against a newer version of the protocol it would bump this variable and associates bits, including potential ABI. This patch defines an XI2LASTEVENT for use in the server and removes the XI2proto.h require. XI2LASTEVENT is the current value of XI_LASTEVENT. This patch is required by components that require access to inputInfo (currently xf86-video-geode and xf86-video-cirrus) but should not have a require for the XI2 protocol. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'Xi/xiselectev.c')
-rw-r--r--Xi/xiselectev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Xi/xiselectev.c b/Xi/xiselectev.c
index e6f36a762..6498d8677 100644
--- a/Xi/xiselectev.c
+++ b/Xi/xiselectev.c
@@ -108,10 +108,10 @@ ProcXISelectEvents(ClientPtr client)
return BadValue;
}
- if ((evmask->mask_len * 4) >= (XI_LASTEVENT + 8)/8)
+ if ((evmask->mask_len * 4) >= (XI2LASTEVENT + 8)/8)
{
unsigned char *bits = (unsigned char*)&evmask[1];
- for (i = XI_LASTEVENT + 1; i < evmask->mask_len * 4; i++)
+ for (i = XI2LASTEVENT + 1; i < evmask->mask_len * 4; i++)
{
if (BitIsOn(bits, i))
return BadValue;