RFC New pointer lock feature

Kristian Høgsberg krh at bitplanet.net
Mon Feb 25 18:24:44 PST 2013


Here's a series of patches (4 for wayland, 5 for weston) that implements
a new pointer lock feature.  Patch 3/4 that adds the protocol describes
the functionality in detail, but the idea is that it's a lot like this:


or for a more readable, less authoritative introduction, this:


By creating an alternative wl_pointer object, an application can lock
the pointer position and receive relative motion events.  Switching
applications will break the lock, but other shells could break the lock
on other events.  I've updated resizor to use a pointer lock for resizing
in addition to the keyboard resizing.  Click in the window to resize,
click again to stop.  The cool showcase for this would be rotating the gears,
but I don't compile that these days (I use gles2 in the clients).

The real use case for this, of course, is mainly games, like the doom3
port the dhewg did a while back and it's something that I think we can use
in the SDL2 wayland backend.


More information about the wayland-devel mailing list