dix: Ensure Proximity events don't kill the server.

Add Prox events to the if-clauses with the other events
that are usually sent from the input devices.
Ensure that the event deliverers won't try to deliver
events of type '0' (some extended events doesn't have
an equivalent core-type)

Small modification by Peter Hutterer.

Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
This commit is contained in:
Magnus Vigerlöf 2008-04-08 14:42:00 +09:30 • committed by Peter Hutterer
commit 5ffbcfec3d
3 changed files with 38 additions and 18 deletions

View file

@ -239,7 +239,8 @@ ChangeDeviceID(DeviceIntPtr dev, xEvent* event)
if (type == DeviceKeyPress || type == DeviceKeyRelease ||
type == DeviceButtonPress || type == DeviceButtonRelease ||
type == DeviceMotionNotify)
type == DeviceMotionNotify || type == ProximityIn ||
type == ProximityOut)
((deviceKeyButtonPointer*)event)->deviceid = dev->id;
else if (type == DeviceValuator)
((deviceValuator*)event)->deviceid = dev->id;