dix: clear up an overly convoluted if statement.
No functional changes, just improves readability. This statement had things added to/removed from it for a few server releases while the input event queue was revamped. What made sense once is now mainly confusing. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
This commit is contained in:
parent
2c70b650b3
commit
aba8133c9c
|
@ -1104,18 +1104,26 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons,
|
||||||
if (!pDev->enabled)
|
if (!pDev->enabled)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
if (!scr || !pDev->valuator)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
switch (type)
|
||||||
|
{
|
||||||
|
case MotionNotify:
|
||||||
|
if (!mask_in || valuator_mask_num_valuators(mask_in) <= 0)
|
||||||
|
return 0;
|
||||||
|
break;
|
||||||
|
case ButtonPress:
|
||||||
|
case ButtonRelease:
|
||||||
|
if (!pDev->button || !buttons)
|
||||||
|
return 0;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
ms = GetTimeInMillis(); /* before pointer update to help precision */
|
ms = GetTimeInMillis(); /* before pointer update to help precision */
|
||||||
|
|
||||||
if (!scr || !pDev->valuator ||
|
|
||||||
(type != MotionNotify && type != ButtonPress && type != ButtonRelease) ||
|
|
||||||
(type != MotionNotify && !pDev->button) ||
|
|
||||||
((type == ButtonPress || type == ButtonRelease) && !buttons))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (type == MotionNotify &&
|
|
||||||
(!mask_in || valuator_mask_num_valuators(mask_in) <= 0))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
events = UpdateFromMaster(events, pDev, DEVCHANGE_POINTER_EVENT, &num_events);
|
events = UpdateFromMaster(events, pDev, DEVCHANGE_POINTER_EVENT, &num_events);
|
||||||
|
|
||||||
raw = (RawDeviceEvent*)events->event;
|
raw = (RawDeviceEvent*)events->event;
|
||||||
|
|
Loading…
Reference in New Issue