diff options
author | Chase Douglas <chase.douglas@canonical.com> | 2012-04-17 13:56:08 -0700 |
---|---|---|
committer | Chase Douglas <chase.douglas@ubuntu.com> | 2012-04-18 13:58:40 -0700 |
commit | 3d06bfe93d33cfe6150d8fb0058ee7bc8d80622b (patch) | |
tree | 5474289431123cfbc92fc5318bcb78ecbe0b1dc2 /Xi | |
parent | 2efbed23c29020f9994ab7c3155ce7386950dc7a (diff) |
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>
Diffstat (limited to 'Xi')
-rw-r--r-- | Xi/exevents.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c index 28b288e06..ae3652b68 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -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 |