dix: remove all listeners when freeing a touch
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
395124bd27
commit
34c9b39d99
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user