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>
dev
Bryce Harrington 9 years ago committed by Pekka Paalanen
parent 7628789640
commit ae6f1bb3f7
  1. 2
      clients/image.c

@ -93,7 +93,7 @@ clamp_view(struct image *image)
image->matrix.x0 = allocation.width - sw; image->matrix.x0 = allocation.width - sw;
} }
if (sh < allocation.width) { if (sh < allocation.height) {
image->matrix.y0 = image->matrix.y0 =
(allocation.height - image->height * scale) / 2; (allocation.height - image->height * scale) / 2;
} else { } else {

Loading…
Cancel
Save