mirror of
https://github.com/labwc/labwc.git
synced 2026-04-12 08:21:13 -04:00
More code style
This commit is contained in:
parent
51e4be0368
commit
56d1331a71
1 changed files with 4 additions and 5 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue