diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2013-04-24 12:53:52 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2013-07-17 14:37:03 +1000 |
commit | 6c880c143f6a32d3bbc529e4a0ab1663ddecf0a0 (patch) | |
tree | 1967de1dbc8af29a842a94b14c19b70c2a97cac8 /dix | |
parent | ab76a3a3fc56cf8f530e5ab9b6389b09da1cdc12 (diff) |
dix: remove all listeners when freeing a touch
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 34c9b39d9937c2e19c2dffc9748605f90d40f965)
Diffstat (limited to 'dix')
-rw-r--r-- | dix/touch.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/dix/touch.c b/dix/touch.c index fb218d4b1..009991433 100644 --- a/dix/touch.c +++ b/dix/touch.c @@ -263,6 +263,7 @@ void TouchFreeTouchPoint(DeviceIntPtr device, int index) { TouchPointInfoPtr ti; + int i; if (!device->touch || index >= device->touch->num_touches) return; @@ -271,6 +272,9 @@ TouchFreeTouchPoint(DeviceIntPtr device, int index) if (ti->active) TouchEndTouch(device, ti); + for (i = 0; i < ti->num_listeners; i++) + TouchRemoveListener(ti, ti->listeners[0].listener); + valuator_mask_free(&ti->valuators); free(ti->sprite.spriteTrace); ti->sprite.spriteTrace = NULL; |