[PATCH wayland 1/2 v2] protocol: Add resize from center flag.

Scott Moreau oreaus at gmail.com
Thu Nov 15 12:02:17 PST 2012


On Thu, Nov 15, 2012 at 12:57 PM, Bill Spitzak <spitzak at gmail.com> wrote:

> A scheme I have seen is to use 15 (ie all 4 edge flags or'd) for
> center-resize. This makes it possible to add 6 (left | right) for "center
> resize horizontally" and 3 (top | bottom) for "center resize vertically".
>
> The only values from 1-15 that have no meaning are when 3 edges are
> selected.


Now that you mention it, I believe I have seen this used somewhere too and
it makes sense. As a side note, the algorithm is always the same for
resize-from-center regardless if it's horizontal, vertical or both.


>
>
> Scott Moreau wrote:
>
>> ---
>>
>> v2:
>>
>> No changes.
>>
>>  protocol/wayland.xml | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/protocol/wayland.xml b/protocol/wayland.xml
>> index 4205dae..25fc3ae 100644
>> --- a/protocol/wayland.xml
>> +++ b/protocol/wayland.xml
>> @@ -551,6 +551,7 @@
>>        <entry name="right" value="8"/>
>>        <entry name="top_right" value="9"/>
>>        <entry name="bottom_right" value="10"/>
>> +      <entry name="from_center" value="16"/>
>>      </enum>
>>       <request name="resize">
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20121115/4a2ff16e/attachment.html>


More information about the wayland-devel mailing list