aboutsummaryrefslogtreecommitdiff
path: root/rootston/input.c
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2019-01-30 10:54:57 +0100
committeremersion <contact@emersion.fr>2019-01-30 15:24:17 +0100
commitd6de329d981f232ad47657d389a76b0da3cd217f (patch)
treefad059dfe27f8be69069fd891c234082f95b4bb3 /rootston/input.c
parentc505ce30191441f6bdc47eae13cf1af83d2fab41 (diff)
seat: don't send motion if pointer hasn't moved
Diffstat (limited to 'rootston/input.c')
-rw-r--r--rootston/input.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/rootston/input.c b/rootston/input.c
index a863b919..757f1b35 100644
--- a/rootston/input.c
+++ b/rootston/input.c
@@ -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));
}
}