*/
void cursor_set(struct seat *seat, const char *cursor_name);
+/**
+ * cursor_update_focus - update cursor focus
+ * @server - server
+ * Use it to force an update of the cursor icon and to send an enter event
+ * to the surface below the cursor.
+ */
+void cursor_update_focus(struct server *server);
+
void cursor_init(struct seat *seat);
void cursor_finish(struct seat *seat);
}
}
+static uint32_t
+msec(const struct timespec *t)
+{
+ return t->tv_sec * 1000 + t->tv_nsec / 1000000;
+}
+
+void
+cursor_update_focus(struct server *server)
+{
+ struct timespec now;
+ clock_gettime(CLOCK_MONOTONIC, &now);
+ cursor_rebase(&server->seat, msec(&now));
+}
+
void
start_drag(struct wl_listener *listener, void *data)
{
wlr_idle_notify_activity(seat->wlr_idle, seat->seat);
/* Notify the client with pointer focus of the axis event. */
- cursor_rebase(seat, event->time_msec);
wlr_seat_pointer_notify_axis(seat->seat, event->time_msec,
event->orientation, event->delta, event->delta_discrete,
event->source);