[PATCH weston 3/4 v2] Center zoom area for text cursor position.

Scott Moreau oreaus at gmail.com
Tue May 22 09:46:34 PDT 2012


> >       interface = seat->pointer->grab->interface;
> > @@ -2456,13 +2456,14 @@ weston_text_cursor_position_notify(struct
> weston_surface *surface,
> >               if (output->zoom.active &&
> >                   pixman_region32_contains_point(&output->region,
> >                                                       cur_pos_x,
> cur_pos_y, NULL))
> > -                     weston_output_update_zoom(output, cur_pos_x * 256,
> cur_pos_y * 256);
> > +                     weston_output_update_zoom(output, cur_pos_x * 256,
> cur_pos_y * 256, 1);
> >  }
> >
> >  WL_EXPORT void
> > -weston_output_update_zoom(struct weston_output *output, wl_fixed_t fx,
> wl_fixed_t fy)
> > +weston_output_update_zoom(struct weston_output *output, wl_fixed_t fx,
> wl_fixed_t fy, int text_cursor)
>
> Boolean arguments makes the code hard to read, use an enum instead.
> Compare
>
>  weston_output_update_zoom(output, cur_pos_x * 256, cur_pos_y * 256, 1);
>
> to
>
>  weston_output_update_zoom(output, cur_pos_x * 256, cur_pos_y * 256,
> ZOOM_TEXT_CURSOR);
>
> Kristian
>
>
Yes, I did consider this but never got around to implementing it.


Scott
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20120522/083fe503/attachment.htm>


More information about the wayland-devel mailing list