When to apply pointer constraints?

Jonas Ådahl jadahl at gmail.com
Thu Nov 17 07:36:27 UTC 2016


On Wed, Nov 16, 2016 at 03:52:42PM +0100, Martin Gräßlin wrote:
> Hi Wayland devs,
> 
> I'm currently implementing the pointer-constraints protocol and run into a
> small uncertainty with the documentation.
> 
> For zwp_locked_pointer_v1::set_region we have: "The new lock region is
> double-
> buffered. The new lock region will only take effect when the associated
> surface gets its pending state applied."
> 
> But for zwp_pointer_constraints_v1::lock_pointer there is no information on
> whether it should be applied immediately or only once the surface gets its
> pending state applied.
> 
> Given that the set_region call is double buffered I assume that after
> creating
> a lock_pointer the surface needs to be committed. Is that correct?

No, that has not been the intention, and it's not how weston/mutter
implements it. IIRC it doesn't say anywhere that locking requires a
commit, so it's not correct to assume so is the case. It could probably
be added without many side effects (except requiring unstable version
bump or stable version bump with per version semantical differences).
Even though I doubt there are any use cases where this matters, it
wouldn't hurt making such a change.

> 
> Similar for confine pointer this is also not fully specified.
> 
> Also for destroy I assume that this will take place immediately and does not
> require another surface commit. Is that correct? The documentation says: "To
> unconfine the pointer, send the destroy request."

Right.


Jonas

> 
> Cheers
> Martin Graesslin
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list