protocol: add invalid_size error to wl_surface
authorSimon Ser <contact@emersion.fr>
Wed, 26 Feb 2020 17:30:57 +0000 (18:30 +0100)
committerPekka Paalanen <pq@iki.fi>
Thu, 5 Mar 2020 14:48:36 +0000 (14:48 +0000)
This allows the compositor to send an error when the client submits a buffer
whose size is not divisible by the buffer scale. Previously, the protocol said
it was a client error but didn't specify any error code.

Signed-off-by: Simon Ser <contact@emersion.fr>
Closes: https://gitlab.freedesktop.org/wayland/wayland/issues/145

protocol/wayland.xml

index f1d95c7..d3e54ee 100644 (file)
       </description>
       <entry name="invalid_scale" value="0" summary="buffer scale value is invalid"/>
       <entry name="invalid_transform" value="1" summary="buffer transform value is invalid"/>
+      <entry name="invalid_size" value="2" summary="buffer size is invalid"/>
     </enum>
 
     <request name="destroy" type="destructor">
 
        The new size of the surface is calculated based on the buffer
        size transformed by the inverse buffer_transform and the
-       inverse buffer_scale. This means that the supplied buffer
-       must be an integer multiple of the buffer_scale.
+       inverse buffer_scale. This means that at commit time the supplied
+       buffer size must be an integer multiple of the buffer_scale. If
+       that's not the case, an invalid_size error is sent.
 
        The x and y arguments specify the location of the new pending
        buffer's upper left corner, relative to the current buffer's upper