On Thu, Sep 08, 2016 at 06:46:29PM +0800, Jonas Ådahl wrote: > Hi, > > This series adds support for raw pointer events, pointer confinement and > introduces pointer warp emulation to implement pointer-lock like features > clients use pointer warping for. > > Raw pointer events is done by adding a new valuator mask setter that takes > both > an absolute value and an unaccelerated value. It is similar to that of > valuator_mask_set_unaccelerated() except that it takes an absolute pointer > coordinate instead of a relative coordinate. > > Confinement is pretty straight forward; if a client tries to grab a pointer > with a confineTo set to some window, this will be translated into confining > the > pointer using the pointer constraints protocol. > > Pointer warping emulation works roughly by locking the pointer whenever an X11 > client tries to warp the pointer while the cursor is invisible. See the > corresponding patch for further details. > > Note that the compositor side implementation of the pointer constraints > protocol need to special case X11 clients due to various reasons. Thus, an > unpatched mutter/weston will not be able to enable confinement and warp > emulation to work properly. mutter/gnome-shell patches, however, are available > here[0]. > > All of this seems to work fairly Ok on various games I have tested. I've > tested > SDL 2 using the X11 backend (ioquake3), GLFW using the X11 backend, OpenTTD, > Half Life 1, Half Life 2, Shadow Warrior, Trine 2, Portal, and they seem to > work with no obvious flaws right now. However given the nature of this > approach, I expect various things needs to be tweaked to get all applications > working. Also special thanks to Krzysztof Sobiecki for helping out and for > testing a lot of games finding. > > While I realize it is pretty late in the development schedule, assuming these > patches introduces too much changes for the coming release, would it be > possible to land at least the ABI breaking ones (1-3?) so that it is possible > to distribute a patched version that will be ABI compatible with the coming > release?
01-11 are Reviewed-by: Peter Hutterer <peter.hutte...@who-t.net>, though it's Friday evening here... I'll try to get to 12 tomorrow. Keith, I think the ABI changes should go in before we lock down, this is a pretty important feature for the Wayland transition and our release cycles aren't exactly predictable at this point. Cheers, Peter > Jonas > > [0] https://github.com/jadahl/mutter/commits/wip/xwayland-pointer-warps > > > Jonas Ådahl (11): > dix: Introduce CursorWarpedTo vfunc in Screen > dix: Incroduce CursorConfinedTo vfunc in Screen > dix: Add valuator_mask_set_absolute_unaccelerated > xwayland: Bind the relative pointer manager > xwayland: Split up device class init/release into functions > xwayland: Dispatch pointer motion events on wl_pointer.frame if > possible > xwayland: Set unaccelerated pointer motion delta if available > xwayland: Put getting a xwl_window from a Window in a helper > xwayland: Bind pointer constraints global > xwayland: Translate a pointer grab with confineTo to pointer > confinement > xwayland: Add pointer warp emulator > > Krzysztof Sobiecki (1): > xwayland: Add a new input device used for pointer warping/locking > > configure.ac | 4 +- > dix/events.c | 8 + > dix/inpututils.c | 13 + > hw/xwayland/.gitignore | 4 + > hw/xwayland/Makefile.am | 28 +- > hw/xwayland/xwayland-cursor.c | 7 + > hw/xwayland/xwayland-input.c | 674 > +++++++++++++++++++++++++++++++++++++----- > hw/xwayland/xwayland.c | 89 +++++- > hw/xwayland/xwayland.h | 43 +++ > include/input.h | 5 +- > include/scrnintstr.h | 14 + > 11 files changed, 815 insertions(+), 74 deletions(-) > > -- > 2.7.4 > > _______________________________________________ > xorg-devel@lists.x.org: X.Org development > Archives: http://lists.x.org/archives/xorg-devel > Info: https://lists.x.org/mailman/listinfo/xorg-devel > _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel