aboutsummaryrefslogtreecommitdiff
path: root/rootston/seat.c
diff options
context:
space:
mode:
Diffstat (limited to 'rootston/seat.c')
-rw-r--r--rootston/seat.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/rootston/seat.c b/rootston/seat.c
index 2abc542b..9412ff0c 100644
--- a/rootston/seat.c
+++ b/rootston/seat.c
@@ -111,6 +111,22 @@ static void handle_pointer_grab_end(struct wl_listener *listener,
roots_cursor_handle_pointer_grab_end(cursor, grab);
}
+static void handle_touch_grab_begin(struct wl_listener *listener,
+ void *data) {
+ struct roots_cursor *cursor =
+ wl_container_of(listener, cursor, touch_grab_begin);
+ struct wlr_seat_touch_grab *grab = data;
+ roots_cursor_handle_touch_grab_begin(cursor, grab);
+}
+
+static void handle_touch_grab_end(struct wl_listener *listener,
+ void *data) {
+ struct roots_cursor *cursor =
+ wl_container_of(listener, cursor, touch_grab_end);
+ struct wlr_seat_touch_grab *grab = data;
+ roots_cursor_handle_touch_grab_end(cursor, grab);
+}
+
static void seat_reset_device_mappings(struct roots_seat *seat, struct wlr_input_device *device) {
struct wlr_cursor *cursor = seat->cursor->cursor;
struct roots_config *config = seat->input->config;
@@ -194,8 +210,6 @@ static void roots_seat_init_cursor(struct roots_seat *seat) {
struct roots_desktop *desktop = seat->input->server->desktop;
wlr_cursor_attach_output_layout(wlr_cursor, desktop->layout);
- wl_list_init(&seat->cursor->touch_points);
-
roots_seat_configure_cursor(seat);
roots_seat_configure_xcursor(seat);
@@ -239,6 +253,14 @@ static void roots_seat_init_cursor(struct roots_seat *seat) {
wl_signal_add(&seat->seat->events.pointer_grab_end,
&seat->cursor->pointer_grab_end);
seat->cursor->pointer_grab_end.notify = handle_pointer_grab_end;
+
+ wl_signal_add(&seat->seat->events.touch_grab_begin,
+ &seat->cursor->touch_grab_begin);
+ seat->cursor->touch_grab_begin.notify = handle_touch_grab_begin;
+
+ wl_signal_add(&seat->seat->events.touch_grab_end,
+ &seat->cursor->touch_grab_end);
+ seat->cursor->touch_grab_end.notify = handle_touch_grab_end;
}
struct roots_seat *roots_seat_create(struct roots_input *input, char *name) {