rootston: remove input event ring buffer

This commit is contained in:
Tony Crisci 2017-12-27 07:31:53 -05:00
parent a79dc7df51
commit 069f120b70
2 changed files with 2 additions and 22 deletions

View File

@ -10,12 +10,6 @@ enum roots_cursor_mode {
ROOTS_CURSOR_ROTATE = 3, ROOTS_CURSOR_ROTATE = 3,
}; };
struct roots_input_event {
uint32_t serial;
struct wlr_cursor *cursor;
struct wlr_input_device *device;
};
struct roots_cursor { struct roots_cursor {
struct roots_seat *seat; struct roots_seat *seat;
struct wlr_cursor *cursor; struct wlr_cursor *cursor;
@ -32,9 +26,6 @@ struct roots_cursor {
int view_x, view_y, view_width, view_height; int view_x, view_y, view_width, view_height;
float view_rotation; float view_rotation;
uint32_t resize_edges; uint32_t resize_edges;
// Ring buffer of input events that could trigger move/resize/rotate
int input_events_idx;
struct roots_input_event input_events[16];
struct wl_listener motion; struct wl_listener motion;
struct wl_listener motion_absolute; struct wl_listener motion_absolute;

View File

@ -174,15 +174,10 @@ static void roots_cursor_press_button(struct roots_cursor *cursor,
} }
} }
uint32_t serial; if (!is_touch) {
if (is_touch) { wlr_seat_pointer_notify_button(seat->seat, time, button, state);
serial = wl_display_get_serial(desktop->server->wl_display);
} else {
serial =
wlr_seat_pointer_notify_button(seat->seat, time, button, state);
} }
int i;
switch (state) { switch (state) {
case WLR_BUTTON_RELEASED: case WLR_BUTTON_RELEASED:
if (!is_touch) { if (!is_touch) {
@ -190,12 +185,6 @@ static void roots_cursor_press_button(struct roots_cursor *cursor,
} }
break; break;
case WLR_BUTTON_PRESSED: 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); roots_seat_set_focus(seat, view);
break; break;
} }