backend/wayland: don't transform pointer events
We do this in a backend independent way in wlr_cursor now.
This commit is contained in:
parent
6f01c12b40
commit
545d54439d
|
@ -74,25 +74,11 @@ static void pointer_handle_motion(void *data, struct wl_pointer *wl_pointer,
|
||||||
}
|
}
|
||||||
|
|
||||||
struct wlr_output *wlr_output = &pointer->output->wlr_output;
|
struct wlr_output *wlr_output = &pointer->output->wlr_output;
|
||||||
|
|
||||||
struct wlr_box box = {
|
|
||||||
.x = wl_fixed_to_int(sx),
|
|
||||||
.y = wl_fixed_to_int(sy),
|
|
||||||
};
|
|
||||||
wlr_box_transform(&box, wlr_output->transform, wlr_output->width,
|
|
||||||
wlr_output->height, &box);
|
|
||||||
box.x /= wlr_output->scale;
|
|
||||||
box.y /= wlr_output->scale;
|
|
||||||
|
|
||||||
int output_width, output_height;
|
|
||||||
wlr_output_effective_resolution(&pointer->output->wlr_output,
|
|
||||||
&output_width, &output_height);
|
|
||||||
|
|
||||||
struct wlr_event_pointer_motion_absolute event = {
|
struct wlr_event_pointer_motion_absolute event = {
|
||||||
.device = &pointer->input_device->wlr_input_device,
|
.device = &pointer->input_device->wlr_input_device,
|
||||||
.time_msec = time,
|
.time_msec = time,
|
||||||
.x = (double)box.x / output_width,
|
.x = wl_fixed_to_double(sx) / wlr_output->width,
|
||||||
.y = (double)box.y / output_height,
|
.y = wl_fixed_to_double(sy) / wlr_output->height,
|
||||||
};
|
};
|
||||||
wlr_signal_emit_safe(&pointer->wlr_pointer.events.motion_absolute, &event);
|
wlr_signal_emit_safe(&pointer->wlr_pointer.events.motion_absolute, &event);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue