aboutsummaryrefslogtreecommitdiff
path: root/rootston
diff options
context:
space:
mode:
authorrandom human <random.bored.human@gmail.com>2018-10-01 06:21:32 +0530
committerAlex Maese <memaese@hotmail.com>2018-12-21 12:20:48 -0600
commitd0203446751f2b8b4e80ecf54b6ff831096c3302 (patch)
tree9c011d365e9e17821cf4bf6659b4122e4cc687a0 /rootston
parentba5b1676dfb0041c88e4966a6c32dee5a5a6513a (diff)
relative_pointer: implement protocol events
Implement zwp_relative_pointer_v1.relative_motion event, along with some glue code in wlr_seat_pointer and rootston.
Diffstat (limited to 'rootston')
-rw-r--r--rootston/cursor.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/rootston/cursor.c b/rootston/cursor.c
index b9ded30e..b03b934e 100644
--- a/rootston/cursor.c
+++ b/rootston/cursor.c
@@ -310,6 +310,9 @@ void roots_cursor_handle_motion(struct roots_cursor *cursor,
double dx = event->delta_x;
double dy = event->delta_y;
+ wlr_seat_pointer_notify_relative_motion(cursor->seat->seat, (uint64_t)
+ event->time_msec, dx, dy, dx, dy);
+
if (cursor->active_constraint) {
struct roots_view *view = cursor->pointer_view->view;
assert(view);
@@ -349,6 +352,11 @@ 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_seat_pointer_notify_relative_motion(cursor->seat->seat, (uint64_t)
+ event->time_msec, dx, dy, dx, dy);
+
if (cursor->pointer_view) {
struct roots_view *view = cursor->pointer_view->view;