Xi: use a temp variable for the new listener
Instead of accessing ti->listener[0] all the time. No functional changes. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
9978b57b8d
commit
fc504a44d1
|
@ -1126,20 +1126,22 @@ static void
|
||||||
TouchPuntToNextOwner(DeviceIntPtr dev, TouchPointInfoPtr ti,
|
TouchPuntToNextOwner(DeviceIntPtr dev, TouchPointInfoPtr ti,
|
||||||
TouchOwnershipEvent *ev)
|
TouchOwnershipEvent *ev)
|
||||||
{
|
{
|
||||||
|
TouchListener *listener = &ti->listeners[0]; /* new owner */
|
||||||
|
|
||||||
/* Deliver the ownership */
|
/* Deliver the ownership */
|
||||||
if (ti->listeners[0].state == LISTENER_AWAITING_OWNER ||
|
if (listener->state == LISTENER_AWAITING_OWNER ||
|
||||||
ti->listeners[0].state == LISTENER_EARLY_ACCEPT)
|
listener->state == LISTENER_EARLY_ACCEPT)
|
||||||
DeliverTouchEvents(dev, ti, (InternalEvent *) ev,
|
DeliverTouchEvents(dev, ti, (InternalEvent *) ev,
|
||||||
ti->listeners[0].listener);
|
listener->listener);
|
||||||
else if (ti->listeners[0].state == LISTENER_AWAITING_BEGIN) {
|
else if (listener->state == LISTENER_AWAITING_BEGIN) {
|
||||||
/* We can't punt to a pointer listener unless all older pointer
|
/* We can't punt to a pointer listener unless all older pointer
|
||||||
* emulated touches have been seen already. */
|
* emulated touches have been seen already. */
|
||||||
if ((ti->listeners[0].type == LISTENER_POINTER_GRAB ||
|
if ((listener->type == LISTENER_POINTER_GRAB ||
|
||||||
ti->listeners[0].type == LISTENER_POINTER_REGULAR) &&
|
listener->type == LISTENER_POINTER_REGULAR) &&
|
||||||
ti != FindOldestPointerEmulatedTouch(dev))
|
ti != FindOldestPointerEmulatedTouch(dev))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
TouchEventHistoryReplay(ti, dev, ti->listeners[0].listener);
|
TouchEventHistoryReplay(ti, dev, listener->listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If we've just removed the last grab and the touch has physically
|
/* If we've just removed the last grab and the touch has physically
|
||||||
|
@ -1150,7 +1152,7 @@ TouchPuntToNextOwner(DeviceIntPtr dev, TouchPointInfoPtr ti,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ti->listeners[0].state == LISTENER_EARLY_ACCEPT)
|
if (listener->state == LISTENER_EARLY_ACCEPT)
|
||||||
ActivateEarlyAccept(dev, ti);
|
ActivateEarlyAccept(dev, ti);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue