dix: replace manual check for event types with IsPointerEvent()

This commit is contained in:
Peter Hutterer 2009-01-14 14:56:10 +10:00
parent 1d54479cb3
commit 1ae529bef5

View File

@ -3592,14 +3592,9 @@ DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev,
* for the type of event, to see if we really want to deliver it to
* the focus window. For pointer events, the answer is no.
*/
if (xE->u.u.type == DeviceButtonPress ||
xE->u.u.type == DeviceButtonRelease ||
xE->u.u.type == DeviceMotionNotify ||
xE->u.u.type == ProximityIn ||
xE->u.u.type == ProximityOut)
{
if (IsPointerEvent(xE))
focus = PointerRootWin;
} else if (thisDev->focus)
else if (thisDev->focus)
{
focus = thisDev->focus->win;
if (focus == FollowKeyboardWin)