mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-15 08:56:26 -05:00
fix memory errors
This commit is contained in:
parent
ab1a12b174
commit
4fbe322fa6
3 changed files with 3 additions and 2 deletions
|
|
@ -274,7 +274,7 @@ static void handle_touch_up(struct wl_listener *listener, void *data) {
|
|||
static void handle_touch_down(struct wl_listener *listener, void *data) {
|
||||
struct sample_state *sample = wl_container_of(listener, sample, touch_down);
|
||||
struct wlr_event_touch_down *event = data;
|
||||
struct touch_point *point = calloc(1, sizeof(struct touch_state));
|
||||
struct touch_point *point = calloc(1, sizeof(struct touch_point));
|
||||
point->slot = event->slot;
|
||||
point->x = event->x_mm / event->width_mm;
|
||||
point->y = event->y_mm / event->height_mm;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue