pointer-constraints protocol: Removing lifetimes and persistency
Las at protonmail.ch
Las at protonmail.ch
Tue May 15 12:36:40 UTC 2018
Yes I propose removing the persistent lifetime, removing the concept of different lifetimes as a whole, and just keeping the oneshot lifetime as the implicit lifetime.
I initially did not consider any of the race conditions, but even then, I do not think it justifies the complex persistent lifetime and the large increase in complexity it brings with it.
I think the approach where the client has to rerequest it each time it enters the region wherein the constraint has to be active, although more prone to slightly incorrect behavior, is superior because of the decreased complexity it burdens the compositor with.
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On 15 May 2018 9:34 AM, Olivier Fourdan <ofourdan at redhat.com> wrote:
> On Thu, May 3, 2018 at 10:53 PM, <Las at protonmail.ch> wrote:
>> I propose removing the concept of persistent pointer constraints and lifetimes in the pointer constraints protocol.
>> This would vastly simplify the implementation of the protocol in the compositor, but slightly increase the complexity in the client.
>> The compositor wouldn't have to keep track of pointer constraints for each valid surface,
>> since only one pointer constraint could then exist per seat.
>> The compositor would also not have to actively check the position of the pointer on the surface, since if it is inactive, it does not exist, and can therefore not be reactivated, so it is not needed to check if the pointer is in the region of a pointer constraint.
>> This would also allow the removal of regions for locked pointers, since then only confined pointers would make use of them.
>> The client would have to recreate the pointer constraint each time the pointer enters the valid region, instead of just making a persistent pointer constraint.
>> This is very simple for previously NULL regions, since you can just recreate it on each pointer enter event, although it's a bit more complex for complex regions, since the client will have to handle that itself now.
> So if I understand correctly, you'd keep only “oneshot” and that would be implicit?
> The concept of “lifetime” appeared in v3 of the protocol review as found here:
> That explains why there are two different “persistent” modes and which kind of race condition each one induces.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the wayland-devel