[PATCH wayland] server: Make serial number 0 mean invalid

Jasper St. Pierre jstpierre at mecheye.net
Thu Oct 1 12:59:44 PDT 2015


For the present case, present_with_event will support focus-stealing
prevention if the serial is garbage or not up to date, whereas present
should always steal focus.

The garbage serial and don't-have-a-serial cases are different, so I
believe we should have two different methods in that case for
different behavior.

On Thu, Oct 1, 2015 at 12:52 PM, Bill Spitzak <spitzak at gmail.com> wrote:
> The no-serial value really really really needs to be zero. Otherwise you get
> all kinds of annoyances with many language wrappers which map zero to false
> and all other values to true. I think most will have to resort to xor'ing
> the value with the no-serial value, meaning the numerical values are all
> different.
>
>
>
> On Wed, Sep 30, 2015 at 1:23 PM, Jasper St. Pierre <jstpierre at mecheye.net>
> wrote:
>>
>>
>> In cases where we have two behaviors for serial-aware and
>> non-serial-aware operations, I would rather have two different client
>> requests.
>
>
> Absolutely wrong. One of the main reasons for the no-serial value is so that
> it is encouraged that unrecognized serial numbers act exactly like the
> no-serial case. If sending garbage to the serial-taking message has some
> useful result that is not achieved by the no-serial version, then clients
> are going to do this. Having a no-serial value avoids this design mistake.
>
>
>



-- 
  Jasper


More information about the wayland-devel mailing list