protocol: unify wl_viewport src and dst size rules
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>
Fri, 4 Apr 2014 11:22:12 +0000 (14:22 +0300)
committerKristian Høgsberg <krh@bitplanet.net>
Mon, 7 Apr 2014 05:38:15 +0000 (22:38 -0700)
commit2c8b5f534be21a7eee89d0476dbf77fe86e59c5f
tree25a10b1d713d529c9cb5c77355bc4855dde0e2ff
parentcd186fbfaf88003175346644d077efa7e70627a2
protocol: unify wl_viewport src and dst size rules

Let's make the source and destination size rules consistent: neither can
have zero, {-1, -1} disables it, and other negatives are not allowed.

The sanity of allowing zero sized source rectangle as debatable. Now the
minimum becomes 1/256x1/256, and with output_scale the actual samples
may be even smaller. That should be enough.

On not allowed values, raise a protocol error. This should help catch
bugs in clients that accidentally send garbage values.

The old wl_viewport.set request remains the same, and can still produce
zero sized source rectangle.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
protocol/scaler.xml
src/compositor.c