Skip to content

Revert "clients: Drop corresponding touch points when destroying windows"

HeYong requested to merge (removed):main into main

This reverts commit 179458ad.

the commit introduced duplicate code about removing the list of touch_point_list, this:

@@ in function window_destroy(struct window *window) ... struct touch_point *tp, *tmp;

wl_list_for_each_safe(tp, tmp,
		      &input->touch_point_list,
		      link) {
	wl_list_remove(&tp->link);
		free(tp);
}
...

@@ in function touch_handle_up(void *data, struct wl_touch *wl_touch, uint32_t serial, uint32_t time, int32_t id) ... wl_list_for_each_safe(tp, tmp, &input->touch_point_list, link) { if (tp->id != id) continue;

	if (tp->widget->touch_up_handler)
		(*tp->widget->touch_up_handler)(tp->widget, input, serial,
						time, id,
						tp->widget->user_data);

	wl_list_remove(&tp->link);
	free(tp);

	return;
}
...

this will lead to the weston-terminal and weston-image prints Segmentation fault (core dumped) when I click the close button on touchscreen I got the same result when I tested on rk3566-evb board and imx8qxpc0-mek board rk3566-evb : weston 8.0.0 imx8qxpc0-mek: weston 9.0.0

Signed-off-by: He Yong hyyoxhk@163.com

Merge request reports

Loading