[PATCH weston] compositor-x11: Fix pointer warping with multiple outputs
Derek Foreman
derekf at osg.samsung.com
Tue Mar 24 07:41:32 PDT 2015
On 20/03/15 05:17 PM, Ondřej Majerech wrote:
> When using the X11 backend with multiple outputs, moving the mouse from
> one output to another would cause it to warp back to the edge of the
> first output.
>
> This was caused by the backend reporting motion events relative to each
> respective output, without taking the output's offset into account.
Sigh. This bug is apparently my fault.
commit 87535e24c broke zoomed input on x11 and wayland backends, so my
commit (0f67941c) landed to fix that.
However, it made weston_output_transform_coordinate work in global
co-ordinates instead of device co-ordinates. Which means it's wrong for
any output that isn't at 0,0.
I've fixed that up in my local tree, but now zoomed input is broken
again, so I've got to sort that out too...
The short story is that this patch doesn't really fix the issue
(transforms are still broken, amongst other problems.)
I hope to have a fix out later today.
> Signed-off-by: Ondřej Majerech <majerech.o at gmail.com>
> ---
> src/compositor-x11.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/src/compositor-x11.c b/src/compositor-x11.c
> index e9735c5..5092a4a 100644
> --- a/src/compositor-x11.c
> +++ b/src/compositor-x11.c
> @@ -1095,10 +1095,11 @@ x11_compositor_deliver_motion_event(struct x11_compositor *c,
> if (!output)
> return;
>
> - weston_output_transform_coordinate(&output->base,
> - wl_fixed_from_int(motion_notify->event_x),
> - wl_fixed_from_int(motion_notify->event_y),
> - &x, &y);
> + weston_output_transform_coordinate(
> + &output->base,
> + wl_fixed_from_int(motion_notify->event_x + output->base.x),
> + wl_fixed_from_int(motion_notify->event_y + output->base.y),
> + &x, &y);
>
> notify_motion(&c->core_seat, weston_compositor_get_time(),
> x - c->prev_x, y - c->prev_y);
>
More information about the wayland-devel
mailing list