mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-02-15 16:10:30 +01:00
dix: remove all listeners when freeing a touch
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 34c9b39d99)
This commit is contained in:
parent
ab76a3a3fc
commit
6c880c143f
1 changed files with 4 additions and 0 deletions
|
|
@ -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…
Add table
Reference in a new issue