*/
static bool
cursor_update_common(struct server *server, struct cursor_context *ctx,
- uint32_t time_msec, bool cursor_has_moved, double *sx, double *sy)
+ bool cursor_has_moved, double *sx, double *sy)
{
struct seat *seat = &server->seat;
struct wlr_seat *wlr_seat = seat->seat;
struct wlr_surface *old_focused_surface =
seat->seat->pointer_state.focused_surface;
- bool notify = cursor_update_common(server, &ctx, time,
+ bool notify = cursor_update_common(server, &ctx,
/* cursor_has_moved */ true, sx, sy);
struct wlr_surface *new_focused_surface =
return notify;
}
-static uint32_t
-msec(const struct timespec *t)
-{
- return t->tv_sec * 1000 + t->tv_nsec / 1000000;
-}
-
static void
_cursor_update_focus(struct server *server)
{
- struct timespec now;
- clock_gettime(CLOCK_MONOTONIC, &now);
-
/* Focus surface under cursor if it isn't already focused */
struct cursor_context ctx = get_cursor_context(server);
}
double sx, sy;
- cursor_update_common(server, &ctx, msec(&now),
- /*cursor_has_moved*/ false, &sx, &sy);
+ cursor_update_common(server, &ctx, /*cursor_has_moved*/ false, &sx, &sy);
}
void
if (ctx.surface && !handled) {
/* Make sure we are sending the events to the surface under the cursor */
double sx, sy;
- cursor_update_common(server, &ctx, event->time_msec,
- /*cursor_has_moved*/ false, &sx, &sy);
+ cursor_update_common(server, &ctx, /*cursor_has_moved*/ false, &sx, &sy);
/* Notify the client with pointer focus of the axis event. */
wlr_seat_pointer_notify_axis(seat->seat, event->time_msec,