From 56d1331a71c59b80cca5cf302dff47939f41fda1 Mon Sep 17 00:00:00 2001 From: Simon Long Date: Fri, 23 Feb 2024 11:17:44 +0000 Subject: [PATCH] More code style --- src/input/touch.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/input/touch.c b/src/input/touch.c index a1ef2a82..16500590 100644 --- a/src/input/touch.c +++ b/src/input/touch.c @@ -54,10 +54,10 @@ touch_motion(struct wl_listener *listener, void *data) wl_list_for_each(touch_point, &seat->touch_points, link) { if (touch_point->touch_id == event->touch_id) { if (touch_point->surface) { - /* Convert coordinates: first [0, 1] => layout, then apply offsets */ + /* Convert coordinates: first [0, 1] => layout */ double lx, ly; - wlr_cursor_absolute_to_layout_coords(seat->cursor, &event->touch->base, - event->x, event->y, &lx, &ly); + wlr_cursor_absolute_to_layout_coords(seat->cursor, + &event->touch->base, event->x, event->y, &lx, &ly); /* Apply offsets to get surface coords before reporting event */ double sx = lx - touch_point->x_offset; @@ -100,8 +100,7 @@ touch_down(struct wl_listener *listener, void *data) wl_list_insert(&seat->touch_points, &touch_point->link); if (touch_point->surface) { - /* Convert coordinates: first [0, 1] => layout, - * then apply offsets */ + /* Convert coordinates: first [0, 1] => layout */ double lx, ly; wlr_cursor_absolute_to_layout_coords(seat->cursor, &event->touch->base, event->x, event->y, &lx, &ly);