seat: don't send motion if pointer hasn't moved

This commit is contained in:
emersion 2019-01-30 10:54:57 +01:00
parent c505ce3019
commit d6de329d98
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
4 changed files with 28 additions and 9 deletions

View file

@ -136,10 +136,11 @@ static inline int64_t timespec_to_msec(const struct timespec *a) {
}
void input_update_cursor_focus(struct roots_input *input) {
struct roots_seat *seat;
struct timespec now;
clock_gettime(CLOCK_MONOTONIC, &now);
struct roots_seat *seat;
wl_list_for_each(seat, &input->seats, link) {
clock_gettime(CLOCK_MONOTONIC, &now);
roots_cursor_update_position(seat->cursor, timespec_to_msec(&now));
}
}