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

Derek Foreman derekf at osg.samsung.com
Mon Oct 5 10:06:28 PDT 2015


On 01/10/15 02:59 PM, Jasper St. Pierre wrote:
> 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.

I thought the intent was that "present" would *never* steal focus, and
that present_from_event could steal focus if certain conditions were met.

I don't think we want the final decision to be up to the application...

> 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.
> 

What do you mean by a "garbage serial"?  Just one that's really old?  Or
the application just made up some random numbers to be anti-social?

> 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.
>>
>>
>>
> 
> 
> 



More information about the wayland-devel mailing list