From 12758a00a2d388b050386f017a3a273c1302e648 Mon Sep 17 00:00:00 2001 From: Tony Crisci Date: Wed, 15 Nov 2017 08:34:35 -0500 Subject: rootston: touch to focus --- include/rootston/seat.h | 7 ++++--- include/wlr/types/wlr_seat.h | 5 +++++ 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/rootston/seat.h b/include/rootston/seat.h index c9dc883c..aebd4399 100644 --- a/include/rootston/seat.h +++ b/include/rootston/seat.h @@ -10,7 +10,7 @@ struct roots_drag_icon { bool mapped; bool is_pointer; - bool touch_id; + int32_t touch_id; int32_t sx; int32_t sy; @@ -26,8 +26,9 @@ struct roots_seat { struct wl_list link; struct wl_list drag_icons; - // coordinates of the touch grab if one exists - double touch_grab_x, touch_grab_y; + // coordinates of the first touch point if it exists + int32_t touch_id; + double touch_x, touch_y; struct roots_view *focus; diff --git a/include/wlr/types/wlr_seat.h b/include/wlr/types/wlr_seat.h index 716e37c5..109e9be9 100644 --- a/include/wlr/types/wlr_seat.h +++ b/include/wlr/types/wlr_seat.h @@ -487,6 +487,11 @@ void wlr_seat_touch_send_up(struct wlr_seat *seat, uint32_t time, void wlr_seat_touch_send_motion(struct wlr_seat *seat, uint32_t time, int32_t touch_id, double sx, double sy); +/** + * How many touch points are currently down for the seat. + */ +int wlr_seat_touch_num_points(struct wlr_seat *seat); + /** * Whether or not the seat has a touch grab other than the default grab. */ -- cgit v1.2.3