Add agressive event type checking.

Best to FatalError if a wrong event comes in. At least that forces me to fix
it really quickly.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2009-02-16 16:34:05 +10:00
commit 6fe4c28bf4
4 changed files with 18 additions and 0 deletions

View file

@ -2247,6 +2247,8 @@ DeliverDeviceEvents(WindowPtr pWin, InternalEvent *event, GrabPtr grab,
xEvent *xE = NULL;
int rc, count = 0;
CHECKEVENT(event);
/* XXX: In theory, we could pass the internal events through to everything
* and only convert just before hitting the wire. We can't do that yet, so
* DDE is the last stop for internal events. From here onwards, we deal
@ -2527,6 +2529,8 @@ CheckMotion(DeviceEvent *ev, DeviceIntPtr pDev)
WindowPtr prevSpriteWin;
SpritePtr pSprite = pDev->spriteInfo->sprite;
CHECKEVENT(ev);
prevSpriteWin = pSprite->win;
if (ev && !syncEvents.playingEvents)