mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
basic touch dnd
This commit is contained in:
parent
94e7dc8a3e
commit
6a516f7c41
9 changed files with 210 additions and 78 deletions
|
|
@ -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;
|
||||
|
|
@ -231,6 +247,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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue