mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2025-12-28 02:40:07 +01:00
Only send touch up events on destroy if the touch is down
Otherwise we trig a bug error message every time we unref the touch.
This commit is contained in:
parent
ea6a348399
commit
cede41d190
2 changed files with 4 additions and 2 deletions
|
|
@ -572,7 +572,8 @@ OBJECT_IMPLEMENT_SETTER(ei_touch, user_data, void *);
|
|||
static void
|
||||
ei_touch_destroy(struct ei_touch *touch)
|
||||
{
|
||||
ei_touch_up(touch);
|
||||
if (touch->state == TOUCH_IS_DOWN)
|
||||
ei_touch_up(touch);
|
||||
ei_device_unref(touch->device);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -529,7 +529,8 @@ OBJECT_IMPLEMENT_SETTER(eis_touch, user_data, void *);
|
|||
static void
|
||||
eis_touch_destroy(struct eis_touch *touch)
|
||||
{
|
||||
eis_touch_up(touch);
|
||||
if (touch->state == TOUCH_IS_DOWN)
|
||||
eis_touch_up(touch);
|
||||
eis_device_unref(touch->device);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue