diff options
author | marha <marha@users.sourceforge.net> | 2011-04-05 14:52:19 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-04-05 14:52:19 +0000 |
commit | 6254e74e8b2ff8a2a1e8476a3300a7bdd65b7ad6 (patch) | |
tree | 02e0d5fd297602d526b582dc527e007fe20a326f /xorg-server/Xi/extinit.c | |
parent | 1d142834bdb30308784a0654a39b7c0de7e37695 (diff) | |
parent | eaedc21febeadad4cf0e370f5d97e7bdb4470870 (diff) | |
download | vcxsrv-6254e74e8b2ff8a2a1e8476a3300a7bdd65b7ad6.tar.gz vcxsrv-6254e74e8b2ff8a2a1e8476a3300a7bdd65b7ad6.tar.bz2 vcxsrv-6254e74e8b2ff8a2a1e8476a3300a7bdd65b7ad6.zip |
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server/Xi/extinit.c')
-rw-r--r-- | xorg-server/Xi/extinit.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/xorg-server/Xi/extinit.c b/xorg-server/Xi/extinit.c index 63f7fca8b..84b0086ff 100644 --- a/xorg-server/Xi/extinit.c +++ b/xorg-server/Xi/extinit.c @@ -49,6 +49,7 @@ SOFTWARE. * Dispatch routines and initialization routines for the X input extension.
*
*/
+#define ARRAY_SIZE(_a) (sizeof((_a)) / sizeof((_a)[0]))
#define NUMTYPES 15
@@ -410,7 +411,7 @@ static int ProcIDispatch(ClientPtr client)
{
REQUEST(xReq);
- if (stuff->data > (IREQUESTS + XI2REQUESTS) || !ProcIVector[stuff->data])
+ if (stuff->data > ARRAY_SIZE(ProcIVector) || !ProcIVector[stuff->data])
return BadRequest;
return (*ProcIVector[stuff->data])(client);
@@ -429,7 +430,7 @@ static int SProcIDispatch(ClientPtr client)
{
REQUEST(xReq);
- if (stuff->data > IREQUESTS || !SProcIVector[stuff->data])
+ if (stuff->data > ARRAY_SIZE(SProcIVector) || !SProcIVector[stuff->data])
return BadRequest;
return (*SProcIVector[stuff->data])(client);
@@ -863,6 +864,8 @@ XI2EventSwap(xGenericEvent *from, xGenericEvent *to) {
case XI_Enter:
case XI_Leave:
+ case XI_FocusIn:
+ case XI_FocusOut:
SDeviceLeaveNotifyEvent((xXILeaveEvent*)from, (xXILeaveEvent*)to);
break;
case XI_DeviceChanged:
|