multiseat: somewhat working

This commit is contained in:
Tony Crisci 2017-11-07 15:56:11 -05:00
parent 2280928bb2
commit 09c6092423
18 changed files with 521 additions and 219 deletions

View file

@ -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_surface_commit(struct wl_listener *listener, void *data) {