[PATCH weston] Use wl_fixed_to_int() in weston_output_update_zoom().

Scott Moreau oreaus at gmail.com
Wed May 16 06:37:35 PDT 2012


> On 05/16/2012 02:18 AM, Scott Moreau wrote:
>
>> This way, we don't have to use wl_fixed_to_int() for
>> each call to weston_output_update_zoom(). The instance
>> in notify_motion() was missed, which broke zoom.
>> ---
>>  src/compositor.c |    3 +++
>>  src/shell.c      |    4 +---
>>  2 files changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/src/compositor.c b/src/compositor.c
>> index 788b1de..e5d89b5 100644
>> --- a/src/compositor.c
>> +++ b/src/compositor.c
>> @@ -2363,6 +2363,9 @@ weston_output_update_zoom(struct weston_output
>> *output, int x, int y)
>>
>
> You should also change the function prototype to make it clear it takes
> wl_fixed_t.
>
>
I thought the same initially but it actually takes int and converts
internally to wl_fixed_t.. and stores them as int. There's no documentation
on this so it's not clear on what the correct solution. All's I know is,
zoom got broken in the process and this fixes it.


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


More information about the wayland-devel mailing list