aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2017-08-24 14:35:55 -0400
committerTony Crisci <tony@dubstepdish.com>2017-08-26 08:32:11 -0400
commit98f4cdfccb7d2ace2929bca45f0479b3472b96ac (patch)
tree03128da9c11198dc3dbe929bf9a413c1d945189c /backend
parent13e895d943eca5e86f68230c5ca503090866aafc (diff)
implement wlr_cursor_map_input_to_output
Diffstat (limited to 'backend')
-rw-r--r--backend/libinput/pointer.c4
-rw-r--r--backend/wayland/wl_seat.c3
2 files changed, 7 insertions, 0 deletions
diff --git a/backend/libinput/pointer.c b/backend/libinput/pointer.c
index 8bda205d..005c9516 100644
--- a/backend/libinput/pointer.c
+++ b/backend/libinput/pointer.c
@@ -30,6 +30,7 @@ void handle_pointer_motion(struct libinput_event *event,
struct libinput_event_pointer *pevent =
libinput_event_get_pointer_event(event);
struct wlr_event_pointer_motion wlr_event = { 0 };
+ wlr_event.device = wlr_dev;
wlr_event.time_sec = libinput_event_pointer_get_time(pevent);
wlr_event.time_usec = libinput_event_pointer_get_time_usec(pevent);
wlr_event.delta_x = libinput_event_pointer_get_dx(pevent);
@@ -48,6 +49,7 @@ void handle_pointer_motion_abs(struct libinput_event *event,
struct libinput_event_pointer *pevent =
libinput_event_get_pointer_event(event);
struct wlr_event_pointer_motion_absolute wlr_event = { 0 };
+ wlr_event.device = wlr_dev;
wlr_event.time_sec = libinput_event_pointer_get_time(pevent);
wlr_event.time_usec = libinput_event_pointer_get_time_usec(pevent);
wlr_event.x_mm = libinput_event_pointer_get_absolute_x(pevent);
@@ -67,6 +69,7 @@ void handle_pointer_button(struct libinput_event *event,
struct libinput_event_pointer *pevent =
libinput_event_get_pointer_event(event);
struct wlr_event_pointer_button wlr_event = { 0 };
+ wlr_event.device = wlr_dev;
wlr_event.time_sec = libinput_event_pointer_get_time(pevent);
wlr_event.time_usec = libinput_event_pointer_get_time_usec(pevent);
wlr_event.button = libinput_event_pointer_get_button(pevent);
@@ -92,6 +95,7 @@ void handle_pointer_axis(struct libinput_event *event,
struct libinput_event_pointer *pevent =
libinput_event_get_pointer_event(event);
struct wlr_event_pointer_axis wlr_event = { 0 };
+ wlr_event.device = wlr_dev;
wlr_event.time_sec = libinput_event_pointer_get_time(pevent);
wlr_event.time_usec = libinput_event_pointer_get_time_usec(pevent);
switch (libinput_event_pointer_get_axis_source(pevent)) {
diff --git a/backend/wayland/wl_seat.c b/backend/wayland/wl_seat.c
index a4cc0ba5..3e6982a0 100644
--- a/backend/wayland/wl_seat.c
+++ b/backend/wayland/wl_seat.c
@@ -51,6 +51,7 @@ static void pointer_handle_motion(void *data, struct wl_pointer *wl_pointer,
wl_egl_window_get_attached_size(wlr_wl_pointer->current_output->egl_window,
&width, &height);
struct wlr_event_pointer_motion_absolute wlr_event;
+ wlr_event.device = dev;
wlr_event.time_sec = time / 1000;
wlr_event.time_usec = time * 1000;
wlr_event.width_mm = width;
@@ -66,6 +67,7 @@ static void pointer_handle_button(void *data, struct wl_pointer *wl_pointer,
assert(dev && dev->pointer);
struct wlr_event_pointer_button wlr_event;
+ wlr_event.device = dev;
wlr_event.button = button;
wlr_event.state = state;
wlr_event.time_sec = time / 1000;
@@ -80,6 +82,7 @@ static void pointer_handle_axis(void *data, struct wl_pointer *wl_pointer,
struct wlr_wl_pointer *wlr_wl_pointer = (struct wlr_wl_pointer *)dev->pointer;
struct wlr_event_pointer_axis wlr_event;
+ wlr_event.device = dev;
wlr_event.delta = value;
wlr_event.orientation = axis;
wlr_event.time_sec = time / 1000;