summaryrefslogtreecommitdiff
path: root/src/zoom.c
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2015-03-24 11:36:15 -0500
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>2015-03-27 09:17:16 +0200
commit7cb916e285feb8b03e7cc7bde6afb3c17fe2e072 (patch)
tree80cfead46931f5e8f3982821733503ffa297b7e8 /src/zoom.c
parent67a18b99425e4a30dfdeb5551de007f42ffcb20e (diff)
downloadweston-7cb916e285feb8b03e7cc7bde6afb3c17fe2e072.tar.gz
zoom: fix zoom
Right now zoom only works on the output at 0, 0 because it's adding the output corner co-ordinates to global co-ordinates that already include the output offset. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Bryce Harrington <b.harrington@samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Diffstat (limited to 'src/zoom.c')
-rw-r--r--src/zoom.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/zoom.c b/src/zoom.c
index 58488896..bee038b1 100644
--- a/src/zoom.c
+++ b/src/zoom.c
@@ -96,8 +96,8 @@ weston_output_update_zoom_transform(struct weston_output *output)
global_x = wl_fixed_to_double(x);
global_y = wl_fixed_to_double(y);
- output->zoom.trans_x = global_x - (output->x + output->width / 2);
- output->zoom.trans_y = global_y - (output->y + output->height / 2);
+ output->zoom.trans_x = global_x - output->width / 2;
+ output->zoom.trans_y = global_y - output->height / 2;
if (output->zoom.trans_x < 0)
output->zoom.trans_x = 0;