diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-02-12 08:37:49 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-02-16 13:28:17 +1000 |
commit | 58f3127919ba5fcb3bb467b6913c28ee1127c82b (patch) | |
tree | 47db811fe9ab2fffa802b540c948d68270bd3648 /Xi/selectev.c | |
parent | 7057a9a97b9316b1de954d05451e04223fdd9fd8 (diff) |
Xi: remove dynamic mask assignment for XI events.
They end up being the same anyway on startup, so let's not have a dynamic mask
assignment mechanism and instead just hardcode them already.
Also unexport SelectForWindow and remove the valid_masks parameter. We can
check that before calling, since there's only one caller anyway.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'Xi/selectev.c')
-rw-r--r-- | Xi/selectev.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Xi/selectev.c b/Xi/selectev.c index c3fc88ed9..b785a8e45 100644 --- a/Xi/selectev.c +++ b/Xi/selectev.c @@ -66,7 +66,6 @@ SOFTWARE. #include "selectev.h" extern Mask ExtExclusiveMasks[]; -extern Mask ExtValidMasks[]; static int HandleDevicePresenceMask(ClientPtr client, WindowPtr win, @@ -173,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; } |