mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-09 23:22:22 +00:00
Rename TouchEnsureSprite to TouchBuildSprite and event type checks
The function will be used for building a sprite for pointer emulation after an explicit device grab. This commit refactors the code so that TouchBuildSprite will function with any event type and moves the checks to the caller. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
2efbed23c2
commit
3d06bfe93d
3 changed files with 8 additions and 16 deletions
|
|
@ -1625,9 +1625,11 @@ ProcessTouchEvent(InternalEvent *ev, DeviceIntPtr dev)
|
|||
CheckMotion(&ev->device_event, dev);
|
||||
|
||||
/* Make sure we have a valid window trace for event delivery; must be
|
||||
* called after event type mutation. */
|
||||
* called after event type mutation. Touch end events are always processed
|
||||
* in order to end touch records. */
|
||||
/* FIXME: check this */
|
||||
if (!TouchEnsureSprite(dev, ti, ev))
|
||||
if ((type == ET_TouchBegin && !TouchBuildSprite(dev, ti, ev)) ||
|
||||
(type != ET_TouchEnd && ti->sprite.spriteTraceGood == 0))
|
||||
return;
|
||||
|
||||
/* TouchOwnership events are handled separately from the rest, as they
|
||||
|
|
|
|||
Loading…
Reference in a new issue