[PATCH weston 6/6] zoom: Change how we select a zoom location
Bill Spitzak
spitzak at gmail.com
Mon Jan 19 17:24:42 PST 2015
This seems excessively complicated compared to a version that just
figures out an x/y pair to use instead of seat->pointer->x/y and leaves
the rest of the code alone.
On 01/09/2015 10:45 AM, Derek Foreman wrote:
> Any time the zoom is updated the best zoom target will be calculated
> with the following priority:
>
> 1) The current pointer location.
>
> 2) The last known location of the pointer that initiated the zoom.
>
> 3) The center of the current keyboard focus. If the focus is split across
> heads, multiple heads may zoom.
This would have to be changed to only zoom the output containing the
center of the current keyboard focus in my proposal, but I kind of feel
that would be better anyway.
> - wl_list_for_each(output, &compositor->output_list, link) {
> - if (pixman_region32_contains_point(&output->region,
> - wl_fixed_to_double(seat->pointer->x),
> - wl_fixed_to_double(seat->pointer->y),
> - NULL)) {
So I propose that the above code refer to two local variables instead of
using wl_fixed_to_double(seat->pointer->x/y). You set those two
variables by calling some function (since it may want to be reused
elsewhere) that turns a seat into an x/y location, using the rules you
suggested.
More information about the wayland-devel
mailing list