diff options
author | Bryce Harrington <bryce@osg.samsung.com> | 2015-09-08 19:24:12 -0700 |
---|---|---|
committer | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2015-09-09 10:07:27 +0300 |
commit | ae6f1bb3f7f7cc90523f6fa184c52ee8d77d9bc5 (patch) | |
tree | 9e8065fd6ae0bb2f20aefec852db9bc90d1a05a4 | |
parent | 76287896408841428804ab94dce2adb8b0b896e3 (diff) | |
download | weston-ae6f1bb3f7f7cc90523f6fa184c52ee8d77d9bc5.tar.gz |
clients: Fix height typo in clamp_view()
We should be checking our scaled image height against the allocation
height rather than the allocation width.
Fixes vertical image motion when horizontal motion restricted, i.e.
when window is wide and short compared to the image.
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-rw-r--r-- | clients/image.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clients/image.c b/clients/image.c index d28f2210..41263054 100644 --- a/clients/image.c +++ b/clients/image.c @@ -93,7 +93,7 @@ clamp_view(struct image *image) image->matrix.x0 = allocation.width - sw; } - if (sh < allocation.width) { + if (sh < allocation.height) { image->matrix.y0 = (allocation.height - image->height * scale) / 2; } else { |