diff options
author | marha <marha@users.sourceforge.net> | 2011-04-05 09:51:44 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-04-05 09:51:44 +0000 |
commit | eaedc21febeadad4cf0e370f5d97e7bdb4470870 (patch) | |
tree | 64e879d8b191f767650e3f4793160a68b0121e4f /xorg-server/Xi/extinit.c | |
parent | 5d8e1ad0cd01de0bd0b43dc916c1d39fd293e79d (diff) | |
download | vcxsrv-eaedc21febeadad4cf0e370f5d97e7bdb4470870.tar.gz vcxsrv-eaedc21febeadad4cf0e370f5d97e7bdb4470870.tar.bz2 vcxsrv-eaedc21febeadad4cf0e370f5d97e7bdb4470870.zip |
xserver xkeyboard-config libxcb xkbcomp mesa git update 5 Apr 2011
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 46d34599c..0b7280d95 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: |