diff options
author | marha <marha@users.sourceforge.net> | 2009-09-06 18:48:27 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-09-06 18:48:27 +0000 |
commit | a915739887477b28d924ecc8417ee107d125bd6c (patch) | |
tree | c02f315476b61892d1fd89182e18943dce8d6277 /xorg-server/Xi/selectev.c | |
parent | 6f25a23db1df27e992c34f6fd4c82e83c44fc2e2 (diff) | |
download | vcxsrv-a915739887477b28d924ecc8417ee107d125bd6c.tar.gz vcxsrv-a915739887477b28d924ecc8417ee107d125bd6c.tar.bz2 vcxsrv-a915739887477b28d924ecc8417ee107d125bd6c.zip |
Switched to xorg-server-1.6.99.900.tar.gz
Diffstat (limited to 'xorg-server/Xi/selectev.c')
-rw-r--r-- | xorg-server/Xi/selectev.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/xorg-server/Xi/selectev.c b/xorg-server/Xi/selectev.c index 9c336fce5..031e602ad 100644 --- a/xorg-server/Xi/selectev.c +++ b/xorg-server/Xi/selectev.c @@ -50,8 +50,6 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> @@ -60,6 +58,7 @@ SOFTWARE. #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ #include <X11/extensions/XI.h> +#include <X11/extensions/XI2.h> #include <X11/extensions/XIproto.h> #include "exevents.h" #include "exglobals.h" @@ -68,7 +67,6 @@ SOFTWARE. #include "selectev.h" extern Mask ExtExclusiveMasks[]; -extern Mask ExtValidMasks[]; static int HandleDevicePresenceMask(ClientPtr client, WindowPtr win, @@ -106,10 +104,9 @@ HandleDevicePresenceMask(ClientPtr client, WindowPtr win, if (mask == 0) return Success; - /* We always only use mksidx = MAXDEVICES for events not bound to + /* We always only use mksidx = AllDevices for events not bound to * devices */ - - if (AddExtensionClient (win, client, mask, MAXDEVICES) != Success) + if (AddExtensionClient (win, client, mask, XIAllDevices) != Success) return BadAlloc; RecalculateDeviceDeliverableEvents(win); @@ -157,7 +154,7 @@ ProcXSelectExtensionEvent(ClientPtr client) REQUEST(xSelectExtensionEventReq); REQUEST_AT_LEAST_SIZE(xSelectExtensionEventReq); - if (stuff->length != (sizeof(xSelectExtensionEventReq) >> 2) + stuff->count) + if (stuff->length != bytes_to_int32(sizeof(xSelectExtensionEventReq)) + stuff->count) return BadLength; ret = dixLookupWindow(&pWin, stuff->window, client, DixReceiveAccess); @@ -175,10 +172,13 @@ ProcXSelectExtensionEvent(ClientPtr client) for (i = 0; i < EMASKSIZE; i++) if (tmp[i].dev != NULL) { + if (tmp[i].mask & ~XIAllMasks) { + client->errorValue = tmp[i].mask; + return BadValue; + } if ((ret = SelectForWindow((DeviceIntPtr) tmp[i].dev, pWin, client, - tmp[i].mask, ExtExclusiveMasks[i], - ExtValidMasks[i])) != Success) + tmp[i].mask, ExtExclusiveMasks[i]))!= Success) return ret; } |