summaryrefslogtreecommitdiff
path: root/Xi/selectev.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2008-06-24 13:46:40 +0930
committerPeter Hutterer <peter@cs.unisa.edu.au>2008-06-26 12:53:05 +0930
commit15e4b6c57484b6afb790c7dc1db9f529ba2219cf (patch)
tree44cc68338159c55bd175688d975a13d8519ee725 /Xi/selectev.c
parentf0c56ffd980db19bea271aeebf118bd931f6f40d (diff)
input: for non-device events (e.g. DevicePresence) use MAX_DEVICES as id.
Using id = 0 only worked pre-MPX since XInput didn't allow XOpenDevice for the core devices (0 and 1). Now we can now legally register for events so we may overwrite our device-independent classes with the ones selected for the VCP. So, increase the EMASKSIZE to MAX_DEVICES + 1 and use MAX_DEVICES as the ID when we don't have a device.
Diffstat (limited to 'Xi/selectev.c')
-rw-r--r--Xi/selectev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Xi/selectev.c b/Xi/selectev.c
index d3670ab1b..53d8f7408 100644
--- a/Xi/selectev.c
+++ b/Xi/selectev.c
@@ -106,10 +106,10 @@ HandleDevicePresenceMask(ClientPtr client, WindowPtr win,
if (mask == 0)
return Success;
- /* We always only use mksidx = 0 for events not bound to
+ /* We always only use mksidx = MAX_DEVICES for events not bound to
* devices */
- if (AddExtensionClient (win, client, mask, 0) != Success)
+ if (AddExtensionClient (win, client, mask, MAX_DEVICES) != Success)
return BadAlloc;
RecalculateDeviceDeliverableEvents(win);