Implement pointer locking and confinement

Graphics / Wayland / Weston - Jonas Ã…dahl [gmail.com] - 26 July 2016 04:21 UTC

This patch implements the wp_pointer_constraints protocol used for locking or confining a pointer. It consists of a new global object with two requests; one for locking the surface to a position, one for confining the pointer to a given region.

In this patch, only the locking part is fully implemented as in specified in the protocol, while confinement is only implemented for when the union of the passed region and the input region of the confined surface is a single rectangle.

Note that the pointer constraints protocol is still unstable and as such has the unstable protocol naming conventions applied.

d3414f2 Implement pointer locking and confinement
Makefile.am | 4 +-
libweston/compositor.c | 8 +
libweston/compositor.h | 35 +++
libweston/input.c | 799 ++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 845 insertions(+), 1 deletion(-)

Upstream: cgit.freedesktop.org


  • Share