diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-12-27 07:54:00 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-27 07:54:00 -0800 |
commit | a0d2a6b445f33b608019809f581a80d28062178d (patch) | |
tree | 289ccf5770963ba14c1f441924b76bb864d8eb07 /rootston | |
parent | 4267ee2bf351338c2aa6e1ed891e3a324108dec0 (diff) | |
parent | 815d71a3aa24cfb87870741319cae99ba1726b8f (diff) |
Merge pull request #525 from acrisci/serial-validation
Serial validation for grab requests
Diffstat (limited to 'rootston')
-rw-r--r-- | rootston/cursor.c | 15 | ||||
-rw-r--r-- | rootston/wl_shell.c | 1 |
2 files changed, 2 insertions, 14 deletions
diff --git a/rootston/cursor.c b/rootston/cursor.c index ad15989d..8bd514cc 100644 --- a/rootston/cursor.c +++ b/rootston/cursor.c @@ -174,15 +174,10 @@ static void roots_cursor_press_button(struct roots_cursor *cursor, } } - uint32_t serial; - if (is_touch) { - serial = wl_display_get_serial(desktop->server->wl_display); - } else { - serial = - wlr_seat_pointer_notify_button(seat->seat, time, button, state); + if (!is_touch) { + wlr_seat_pointer_notify_button(seat->seat, time, button, state); } - int i; switch (state) { case WLR_BUTTON_RELEASED: if (!is_touch) { @@ -190,12 +185,6 @@ static void roots_cursor_press_button(struct roots_cursor *cursor, } break; case WLR_BUTTON_PRESSED: - i = cursor->input_events_idx; - cursor->input_events[i].serial = serial; - cursor->input_events[i].cursor = cursor->cursor; - cursor->input_events[i].device = device; - cursor->input_events_idx = (i + 1) - % (sizeof(cursor->input_events) / sizeof(cursor->input_events[0])); roots_seat_set_focus(seat, view); break; } diff --git a/rootston/wl_shell.c b/rootston/wl_shell.c index 7f70acae..65067920 100644 --- a/rootston/wl_shell.c +++ b/rootston/wl_shell.c @@ -43,7 +43,6 @@ static void handle_request_resize(struct wl_listener *listener, void *data) { struct roots_input *input = view->desktop->server->input; struct wlr_wl_shell_surface_resize_event *e = data; 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; } |