|
|
|
@ -5,6 +5,7 @@
|
|
|
|
|
#include <time.h>
|
|
|
|
|
#include <wayland-server.h>
|
|
|
|
|
#include <wlr/types/wlr_input_device.h>
|
|
|
|
|
#include <wlr/types/wlr_relative_pointer_v1.h>
|
|
|
|
|
#include <wlr/util/log.h>
|
|
|
|
|
#include "types/wlr_seat.h"
|
|
|
|
|
#include "util/signal.h"
|
|
|
|
@ -304,6 +305,20 @@ void wlr_seat_pointer_notify_motion(struct wlr_seat *wlr_seat, uint32_t time,
|
|
|
|
|
grab->interface->motion(grab, time, sx, sy);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void wlr_seat_pointer_notify_relative_motion(struct wlr_seat *wlr_seat,
|
|
|
|
|
uint64_t time, double dx, double dy, double dx_unaccel, double dy_unaccel) {
|
|
|
|
|
struct wlr_seat_client *client = wlr_seat->pointer_state.focused_client;
|
|
|
|
|
if (client == NULL) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
struct wl_resource *resource;
|
|
|
|
|
wl_resource_for_each(resource, &client->relative_pointers) {
|
|
|
|
|
wlr_relative_pointer_v1_send_relative_motion(resource, time, dx, dy,
|
|
|
|
|
dx_unaccel, dy_unaccel);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
uint32_t wlr_seat_pointer_notify_button(struct wlr_seat *wlr_seat,
|
|
|
|
|
uint32_t time, uint32_t button, uint32_t state) {
|
|
|
|
|
clock_gettime(CLOCK_MONOTONIC, &wlr_seat->last_event);
|
|
|
|
|