On 01/20/2015 07:44 AM, Derek Foreman wrote:

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.

Why is that better?  I don't really have much of an opinion one way or
the other.  But this is all subjective.  I'll vote for my way because I
already wrote it like this, you vote for yours, someone else can break
the tie? ;)

I figured it was better because it would only zoom one output, which is what all the other values do. Also because it allows the "what to zoom" to be identified by an xy pair.

-    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.

I'm not sure I follow.  Are you saying we should have a
"weston_set_zoom_focus()" function and call that every time we change
the pointer location (or keyboard focus if there's no pointer)?

I meant a function would be called that would calculate and return the xy values. Something like this:

   wl_fixed_t x, y;
   weston_get_interesting_xy_for_seat(seat, &x, &y); // this function
   ... use x,y ...
_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to