[PATCH] Declare enumeration wl_output.transform as bitfield.

Nils Chr. Brause nilschrbrause at gmail.com
Sun Nov 15 13:17:38 PST 2015


On Sun, Nov 15, 2015 at 9:48 PM, Auke Booij <auke at tulcod.com> wrote:
> On 9 November 2015 at 18:17, Bill Spitzak <spitzak at gmail.com> wrote:
>> Making the transform into a bitfield allows bitfield tests for useful facts:
>> it can see if it is a mirror image by testing the flip bit, and check for
>> transposition of the axes by checking the 90 degree bit. I believe this is
>> the reason behind the desire to declare it a bitfield and I agree this is
>> nice to have.
>>
>> I really do not see the problem with allowing it to be an int argument as
>> long as the enum value 2^31 is not used. Though I am also stumped as to why
>> you can't change the current misused ints into uint in the protocol. It will
>> not change the bit layout in the messages and therefore is not a protocol
>> change.
>
> I don't really know what to do with this final claim. I like the idea,
> and it makes sense. Finally, it will solve this issue and potentially
> future ones as well. Is there any chance it could be implemented or is
> it a crazy idea?

Bill is absolutely right. And it also doesn't even really change the C API,
because nobody is passing negetive numbers or number greater than 2^31-1
there anyway. Therefore, I am all for a change. :)


More information about the wayland-devel mailing list