[PATCH weston 2/4] input: Add a weston_pointer_output_center

Rob Bradford robert.bradford at intel.com
Wed Jun 12 07:53:11 PDT 2013


On Tue, Jun 11, 2013 at 03:08:23PM +0300, Pekka Paalanen wrote:
> On Mon, 10 Jun 2013 15:17:29 +0100
> Rob Bradford <robert.bradford at intel.com> wrote:
> 
> > From: Rob Bradford <rob at linux.intel.com>
> > 
> > Centre the pointer on a the provided output. This function provides the
> > basis of ensuring that the pointer starts on the output when we start to
> > constrain a seat to a given output.

> >  WL_EXPORT void
> > +weston_pointer_output_center(struct weston_pointer *pointer,
> > +			     struct weston_output *output)
> > +{
> > +	pointer->x = wl_fixed_from_int(output->x + output->width / 2);
> > +	pointer->y = wl_fixed_from_int(output->y + output->height / 2);
> 
> What about all the processing that happens in input.c notify_motion()
> and move_pointer(), is that really not needed here?

Hi Pekka,

Thanks for highlighting this. I should write this function in terms of
move_pointer().

Rob


More information about the wayland-devel mailing list