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