diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-11-18 14:14:03 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-18 14:14:03 -0500 |
commit | fa36ac90f70787176a5cfdb6fa6835aa1226f697 (patch) | |
tree | 5023bac3638960ef0eda89554865e2a612804486 /include/rootston | |
parent | 9f552d896f7639fca7914a9313ccb244688349e4 (diff) | |
parent | 458fe633df7827f5b74c034026b6b67045c1e610 (diff) |
Merge pull request #418 from acrisci/feature/wlr-seat-touch
wlr-seat: touch
Diffstat (limited to 'include/rootston')
-rw-r--r-- | include/rootston/cursor.h | 10 | ||||
-rw-r--r-- | include/rootston/seat.h | 14 |
2 files changed, 16 insertions, 8 deletions
diff --git a/include/rootston/cursor.h b/include/rootston/cursor.h index f49b6439..f0c9be89 100644 --- a/include/rootston/cursor.h +++ b/include/rootston/cursor.h @@ -39,7 +39,6 @@ struct roots_cursor { uint32_t resize_edges; // Ring buffer of input events that could trigger move/resize/rotate int input_events_idx; - struct wl_list touch_points; struct roots_input_event input_events[16]; struct wl_listener motion; @@ -57,6 +56,9 @@ struct roots_cursor { struct wl_listener pointer_grab_begin; struct wl_listener pointer_grab_end; + struct wl_listener touch_grab_begin; + struct wl_listener touch_grab_end; + struct wl_listener request_set_cursor; }; @@ -100,4 +102,10 @@ void roots_cursor_handle_pointer_grab_begin(struct roots_cursor *cursor, void roots_cursor_handle_pointer_grab_end(struct roots_cursor *cursor, struct wlr_seat_pointer_grab *grab); +void roots_cursor_handle_touch_grab_begin(struct roots_cursor *cursor, + struct wlr_seat_touch_grab *grab); + +void roots_cursor_handle_touch_grab_end(struct roots_cursor *cursor, + struct wlr_seat_touch_grab *grab); + #endif diff --git a/include/rootston/seat.h b/include/rootston/seat.h index bef515a4..aebd4399 100644 --- a/include/rootston/seat.h +++ b/include/rootston/seat.h @@ -9,6 +9,9 @@ struct roots_drag_icon { struct wl_list link; // roots_seat::drag_icons bool mapped; + bool is_pointer; + int32_t touch_id; + int32_t sx; int32_t sy; @@ -23,6 +26,10 @@ struct roots_seat { struct wl_list link; struct wl_list drag_icons; + // coordinates of the first touch point if it exists + int32_t touch_id; + double touch_x, touch_y; + struct roots_view *focus; struct wl_list keyboards; @@ -43,13 +50,6 @@ struct roots_touch { struct wl_list link; }; -struct roots_touch_point { - struct roots_touch *device; - int32_t slot; - double x, y; - struct wl_list link; -}; - struct roots_tablet_tool { struct roots_seat *seat; struct wlr_input_device *device; |