Merge pull request #765 from swaywm/transformed-events

Use libinput transformed events instead of width_mm/height_mm
This commit is contained in:
emersion 2018-03-28 14:11:39 -04:00 committed by GitHub
commit 5dd022da13
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 105 additions and 100 deletions

View file

@ -112,10 +112,8 @@ static bool handle_x11_event(struct wlr_x11_backend *x11, xcb_generic_event_t *e
struct wlr_event_pointer_motion_absolute abs = {
.device = &x11->pointer_dev,
.time_msec = ev->time,
.x_mm = ev->event_x,
.y_mm = ev->event_y,
.width_mm = output->wlr_output.width,
.height_mm = output->wlr_output.height,
.x = (double)ev->event_x / output->wlr_output.width,
.y = (double)ev->event_y / output->wlr_output.height,
};
wlr_signal_emit_safe(&x11->pointer.events.motion_absolute, &abs);
@ -140,10 +138,8 @@ static bool handle_x11_event(struct wlr_x11_backend *x11, xcb_generic_event_t *e
struct wlr_event_pointer_motion_absolute abs = {
.device = &x11->pointer_dev,
.time_msec = x11->time,
.x_mm = pointer->root_x,
.y_mm = pointer->root_y,
.width_mm = output->wlr_output.width,
.height_mm = output->wlr_output.height,
.x = (double)pointer->root_x / output->wlr_output.width,
.y = (double)pointer->root_y / output->wlr_output.height,
};
wlr_signal_emit_safe(&x11->pointer.events.motion_absolute, &abs);