mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 08:04:30 +00:00
dix: remove all listeners when freeing a touch
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user