diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-11-11 10:11:31 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-11 10:11:31 -0500 |
commit | a538ef33c1f27d5180117933bee40ecd93fbea7a (patch) | |
tree | be639c73a782ecfd680dabc31d3a4e4208cba61f /rootston/wl_shell.c | |
parent | 78ed7f3c8983191b0b6399d4c66f5524a23f216a (diff) | |
parent | 2a9dc60f28616211370fcd48de8c75ef17282d2e (diff) |
Merge pull request #384 from acrisci/feature/multiseat
multiseat
Diffstat (limited to 'rootston/wl_shell.c')
-rw-r--r-- | rootston/wl_shell.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/rootston/wl_shell.c b/rootston/wl_shell.c index 3ac8fe61..96f461fe 100644 --- a/rootston/wl_shell.c +++ b/rootston/wl_shell.c @@ -29,11 +29,11 @@ static void handle_request_move(struct wl_listener *listener, void *data) { struct roots_view *view = roots_surface->view; struct roots_input *input = view->desktop->server->input; struct wlr_wl_shell_surface_move_event *e = data; - const struct roots_input_event *event = get_input_event(input, e->serial); - if (!event || input->mode != ROOTS_CURSOR_PASSTHROUGH) { + struct roots_seat *seat = input_seat_from_wlr_seat(input, e->seat->seat); + if (!seat || seat->cursor->mode != ROOTS_CURSOR_PASSTHROUGH) { return; } - view_begin_move(input, event->cursor, view); + roots_seat_begin_move(seat, view); } static void handle_request_resize(struct wl_listener *listener, void *data) { @@ -42,11 +42,12 @@ static void handle_request_resize(struct wl_listener *listener, void *data) { struct roots_view *view = roots_surface->view; struct roots_input *input = view->desktop->server->input; struct wlr_wl_shell_surface_resize_event *e = data; - const struct roots_input_event *event = get_input_event(input, e->serial); - if (!event || input->mode != ROOTS_CURSOR_PASSTHROUGH) { + struct roots_seat *seat = input_seat_from_wlr_seat(input, e->seat->seat); + // TODO verify input event + if (!seat || seat->cursor->mode != ROOTS_CURSOR_PASSTHROUGH) { return; } - view_begin_resize(input, event->cursor, view, e->edges); + roots_seat_begin_resize(seat, view, e->edges); } static void handle_request_set_maximized(struct wl_listener *listener, |