diff options
author | Chase Douglas <chase.douglas@canonical.com> | 2012-04-17 11:39:10 -0700 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2012-04-26 13:35:14 +1000 |
commit | 04431dd5e60dc91b61767157914b874515a18feb (patch) | |
tree | d113a0bf12859190aaaf2040581a8fc6caf84226 /Xi/exevents.c | |
parent | 8ce9616a2ccd3f80bf56d69cb9e3fad89996fffb (diff) |
Ensure touch is ended when last listener is rejected
Currently, the touch is only logically ended if the touch has physically
ended. If the touch hasn't physically ended, the touch record is never
ended. If there aren't any more listeners, we don't need to keep the dix
touch record around any more.
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit e175971a6f44d94aa8306dc6b9228ccb2c8a0b4d)
Diffstat (limited to 'Xi/exevents.c')
-rw-r--r-- | Xi/exevents.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c index a1eccaa9a..d85f01fd6 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -1234,14 +1234,6 @@ TouchRejected(DeviceIntPtr sourcedev, TouchPointInfoPtr ti, XID resource, } } - /* If there are no other listeners left, and the touchpoint is pending - * finish, then we can just kill it now. */ - if (ti->num_listeners == 1 && ti->pending_finish) { - TouchEndTouch(sourcedev, ti); - CheckOldestTouch(sourcedev); - return; - } - /* Remove the resource from the listener list, updating * ti->num_listeners, as well as ti->num_grabs if it was a grab. */ if (TouchRemoveListener(ti, resource)) { @@ -1254,6 +1246,8 @@ TouchRejected(DeviceIntPtr sourcedev, TouchPointInfoPtr ti, XID resource, * the TouchOwnership or TouchBegin event to the new owner. */ if (ev && ti->num_listeners > 0 && was_owner) TouchPuntToNextOwner(sourcedev, ti, ev); + else if (ti->num_listeners == 0) + TouchEndTouch(sourcedev, ti); CheckOldestTouch(sourcedev); } |