summaryrefslogtreecommitdiff
path: root/dix
diff options
context:
space:
mode:
authorChase Douglas <chase.douglas@canonical.com>2012-04-17 13:56:08 -0700
committerChase Douglas <chase.douglas@ubuntu.com>2012-04-18 13:58:40 -0700
commit3d06bfe93d33cfe6150d8fb0058ee7bc8d80622b (patch)
tree5474289431123cfbc92fc5318bcb78ecbe0b1dc2 /dix
parent2efbed23c29020f9994ab7c3155ce7386950dc7a (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 'dix')
-rw-r--r--dix/touch.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/dix/touch.c b/dix/touch.c
index 72faad546..e638a894a 100644
--- a/dix/touch.c
+++ b/dix/touch.c
@@ -542,22 +542,12 @@ TouchBuildDependentSpriteTrace(DeviceIntPtr dev, SpritePtr sprite)
* TouchBegin events.
*/
Bool
-TouchEnsureSprite(DeviceIntPtr sourcedev, TouchPointInfoPtr ti,
- InternalEvent *ev)
+TouchBuildSprite(DeviceIntPtr sourcedev, TouchPointInfoPtr ti,
+ InternalEvent *ev)
{
TouchClassPtr t = sourcedev->touch;
SpritePtr sprite = &ti->sprite;
- /* We may not have a sprite if there are no applicable grabs or
- * event selections, or if they've disappeared, or if all the grab
- * owners have rejected the touch. Don't bother delivering motion
- * events if not, but TouchEnd events still need to be processed so
- * we can call FinishTouchPoint and release it for later use. */
- if (ev->any.type == ET_TouchEnd)
- return TRUE;
- else if (ev->any.type != ET_TouchBegin)
- return (sprite->spriteTraceGood > 0);
-
if (t->mode == XIDirectTouch) {
/* Focus immediately under the touchpoint in direct touch mode.
* XXX: Do we need to handle crossing screens here? */