aboutsummaryrefslogtreecommitdiff
path: root/rootston/cursor.c
diff options
context:
space:
mode:
Diffstat (limited to 'rootston/cursor.c')
-rw-r--r--rootston/cursor.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/rootston/cursor.c b/rootston/cursor.c
index b9ded30e..d2d3b510 100644
--- a/rootston/cursor.c
+++ b/rootston/cursor.c
@@ -35,7 +35,8 @@ void roots_cursor_destroy(struct roots_cursor *cursor) {
// TODO
}
-static void seat_view_deco_motion(struct roots_seat_view *view, double deco_sx, double deco_sy) {
+static void seat_view_deco_motion(struct roots_seat_view *view,
+ double deco_sx, double deco_sy) {
struct roots_cursor *cursor = view->seat->cursor;
double sx = deco_sx;
@@ -310,6 +311,14 @@ void roots_cursor_handle_motion(struct roots_cursor *cursor,
double dx = event->delta_x;
double dy = event->delta_y;
+ double dx_unaccel = event->unaccel_dx;
+ double dy_unaccel = event->unaccel_dy;
+
+ wlr_relative_pointer_manager_v1_send_relative_motion(
+ cursor->seat->input->server->desktop->relative_pointer_manager,
+ cursor->seat->seat, (uint64_t)event->time_msec * 1000, dx, dy,
+ dx_unaccel, dy_unaccel);
+
if (cursor->active_constraint) {
struct roots_view *view = cursor->pointer_view->view;
assert(view);
@@ -349,6 +358,12 @@ void roots_cursor_handle_motion_absolute(struct roots_cursor *cursor,
wlr_cursor_absolute_to_layout_coords(cursor->cursor, event->device, event->x,
event->y, &lx, &ly);
+ double dx = lx - cursor->cursor->x;
+ double dy = ly - cursor->cursor->y;
+ wlr_relative_pointer_manager_v1_send_relative_motion(
+ cursor->seat->input->server->desktop->relative_pointer_manager,
+ cursor->seat->seat, (uint64_t)event->time_msec * 1000, dx, dy, dx, dy);
+
if (cursor->pointer_view) {
struct roots_view *view = cursor->pointer_view->view;