Re: [PATCH wayland-protocols 2/2] Introduce pointer locking and confinement protocol
On 18/11/15 06:59 PM, Peter Hutterer wrote: > On Tue, Nov 17, 2015 at 06:09:18PM +0800, Jonas Ådahl wrote: >> This patch introduces a new protocol for locking and 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. >> >> Signed-off-by: Jonas Ådahl >> --- >> >> Changes since last version sent as weston patches: >> >> Interfaces and protocol renamed according to wayland-protocols naming >> conventions. >> >> The global interface is now called wl_pointer_constraints instead of >> wl_pointer_lock. >> >> The position hint is now double buffered. >> >> Various other minor changes. >> >> >> Jonas >> >> >> Makefile.am| 1 + >> unstable/pointer-constraints/README| 4 + >> .../pointer-constraints-unstable-v1.xml| 283 >> + >> 3 files changed, 288 insertions(+) >> create mode 100644 unstable/pointer-constraints/README >> create mode 100644 >> unstable/pointer-constraints/pointer-constraints-unstable-v1.xml >> >> diff --git a/Makefile.am b/Makefile.am >> index 2db6bd5..983ae1b 100644 >> --- a/Makefile.am >> +++ b/Makefile.am >> @@ -6,6 +6,7 @@ nobase_dist_pkgdata_DATA = >> \ >> unstable/input-method/input-method-unstable-v1.xml >> \ >> unstable/xdg-shell/xdg-shell-unstable-v5.xml >> \ >> unstable/relative-pointer/relative-pointer-unstable-v1.xml >> \ >> +unstable/pointer-constraints/pointer-constraints-unstable-v1.xml >> \ >> $(NULL) >> >> pkgconfigdir = $(libdir)/pkgconfig >> diff --git a/unstable/pointer-constraints/README >> b/unstable/pointer-constraints/README >> new file mode 100644 >> index 000..8a242f8 >> --- /dev/null >> +++ b/unstable/pointer-constraints/README >> @@ -0,0 +1,4 @@ >> +Pointer constraints protocol >> + >> +Maintainers: >> +Jonas Ådahl >> diff --git >> a/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml >> b/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml >> new file mode 100644 >> index 000..c71d6d5 >> --- /dev/null >> +++ b/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml >> @@ -0,0 +1,283 @@ >> + >> + >> + >> + >> +Copyright © 2014 Jonas Ådahl >> +Copyright © 2015 Red Hat Inc. >> + >> +Permission is hereby granted, free of charge, to any person obtaining a >> +copy of this software and associated documentation files (the >> "Software"), >> +to deal in the Software without restriction, including without >> limitation >> +the rights to use, copy, modify, merge, publish, distribute, sublicense, >> +and/or sell copies of the Software, and to permit persons to whom the >> +Software is furnished to do so, subject to the following conditions: >> + >> +The above copyright notice and this permission notice (including the >> next >> +paragraph) shall be included in all copies or substantial portions of >> the >> +Software. >> + >> +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS >> OR >> +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, >> +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL >> +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR >> OTHER >> +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING >> +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER >> +DEALINGS IN THE SOFTWARE. >> + >> + >> + >> + >> + The global interface exposing pointer constraining functionality. It >> + exposes two requests; lock_pointer for locking the pointer to its >> + position, and confine_pointer for locking the pointer to a region. >> + >> + The lock_pointer and confine_pointer creates the objects >> wp_locked_pointer > > typo: create > and either skip "The" or use "The ... requests" > >> + and wp_confined_pointer respectively, and the client can use these >> objects >> + to interact with the lock. >> + >> + For any surface, only one lock or confinement per seat may be active >> at >> + any time. If a lock or confinement is requested when another lock or >> + confinement is active or requested on that surface and seat, an >> + 'already_constrained' error will be raised. >> + >> + Warning! The protocol described in this file is experimental and >> + backward incompatible changes may be made. Backward compatible changes >> + may be added together with the corresponding interface version bump. >> + Backward incompatible changes are done by bumping the version number >> in >> + the protocol and interface names and resetting the interface version. >> + Once the protocol is to be declared
Re: [PATCH wayland-protocols 2/2] Introduce pointer locking and confinement protocol
On Tue, Nov 17, 2015 at 06:09:18PM +0800, Jonas Ådahl wrote: > This patch introduces a new protocol for locking and 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. > > Signed-off-by: Jonas Ådahl > --- > > Changes since last version sent as weston patches: > > Interfaces and protocol renamed according to wayland-protocols naming > conventions. > > The global interface is now called wl_pointer_constraints instead of > wl_pointer_lock. > > The position hint is now double buffered. > > Various other minor changes. > > > Jonas > > > Makefile.am| 1 + > unstable/pointer-constraints/README| 4 + > .../pointer-constraints-unstable-v1.xml| 283 > + > 3 files changed, 288 insertions(+) > create mode 100644 unstable/pointer-constraints/README > create mode 100644 > unstable/pointer-constraints/pointer-constraints-unstable-v1.xml > > diff --git a/Makefile.am b/Makefile.am > index 2db6bd5..983ae1b 100644 > --- a/Makefile.am > +++ b/Makefile.am > @@ -6,6 +6,7 @@ nobase_dist_pkgdata_DATA = > \ > unstable/input-method/input-method-unstable-v1.xml > \ > unstable/xdg-shell/xdg-shell-unstable-v5.xml > \ > unstable/relative-pointer/relative-pointer-unstable-v1.xml > \ > + unstable/pointer-constraints/pointer-constraints-unstable-v1.xml > \ > $(NULL) > > pkgconfigdir = $(libdir)/pkgconfig > diff --git a/unstable/pointer-constraints/README > b/unstable/pointer-constraints/README > new file mode 100644 > index 000..8a242f8 > --- /dev/null > +++ b/unstable/pointer-constraints/README > @@ -0,0 +1,4 @@ > +Pointer constraints protocol > + > +Maintainers: > +Jonas Ådahl > diff --git a/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml > b/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml > new file mode 100644 > index 000..c71d6d5 > --- /dev/null > +++ b/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml > @@ -0,0 +1,283 @@ > + > + > + > + > +Copyright © 2014 Jonas Ådahl > +Copyright © 2015 Red Hat Inc. > + > +Permission is hereby granted, free of charge, to any person obtaining a > +copy of this software and associated documentation files (the > "Software"), > +to deal in the Software without restriction, including without limitation > +the rights to use, copy, modify, merge, publish, distribute, sublicense, > +and/or sell copies of the Software, and to permit persons to whom the > +Software is furnished to do so, subject to the following conditions: > + > +The above copyright notice and this permission notice (including the next > +paragraph) shall be included in all copies or substantial portions of the > +Software. > + > +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS > OR > +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL > +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR > OTHER > +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING > +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER > +DEALINGS IN THE SOFTWARE. > + > + > + > + > + The global interface exposing pointer constraining functionality. It > + exposes two requests; lock_pointer for locking the pointer to its > + position, and confine_pointer for locking the pointer to a region. > + > + The lock_pointer and confine_pointer creates the objects > wp_locked_pointer typo: create and either skip "The" or use "The ... requests" > + and wp_confined_pointer respectively, and the client can use these > objects > + to interact with the lock. > + > + For any surface, only one lock or confinement per seat may be active at > + any time. If a lock or confinement is requested when another lock or > + confinement is active or requested on that surface and seat, an > + 'already_constrained' error will be raised. > + > + Warning! The protocol described in this file is experimental and > + backward incompatible changes may be made. Backward compatible changes > + may be added together with the corresponding interface version bump. > + Backward incompatible changes are done by bumping the version number in > + the protocol and interface names and resetting the interface version. > + Once the protocol is to be declared stable, the 'z' prefix and the > + version number in the protocol and interface names are removed and the > + interface version number is reset. > + > + > + > +
[PATCH wayland-protocols 2/2] Introduce pointer locking and confinement protocol
This patch introduces a new protocol for locking and 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. Signed-off-by: Jonas Ådahl --- Changes since last version sent as weston patches: Interfaces and protocol renamed according to wayland-protocols naming conventions. The global interface is now called wl_pointer_constraints instead of wl_pointer_lock. The position hint is now double buffered. Various other minor changes. Jonas Makefile.am| 1 + unstable/pointer-constraints/README| 4 + .../pointer-constraints-unstable-v1.xml| 283 + 3 files changed, 288 insertions(+) create mode 100644 unstable/pointer-constraints/README create mode 100644 unstable/pointer-constraints/pointer-constraints-unstable-v1.xml diff --git a/Makefile.am b/Makefile.am index 2db6bd5..983ae1b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,6 +6,7 @@ nobase_dist_pkgdata_DATA = \ unstable/input-method/input-method-unstable-v1.xml \ unstable/xdg-shell/xdg-shell-unstable-v5.xml \ unstable/relative-pointer/relative-pointer-unstable-v1.xml \ + unstable/pointer-constraints/pointer-constraints-unstable-v1.xml \ $(NULL) pkgconfigdir = $(libdir)/pkgconfig diff --git a/unstable/pointer-constraints/README b/unstable/pointer-constraints/README new file mode 100644 index 000..8a242f8 --- /dev/null +++ b/unstable/pointer-constraints/README @@ -0,0 +1,4 @@ +Pointer constraints protocol + +Maintainers: +Jonas Ådahl diff --git a/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml b/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml new file mode 100644 index 000..c71d6d5 --- /dev/null +++ b/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml @@ -0,0 +1,283 @@ + + + + +Copyright © 2014 Jonas Ådahl +Copyright © 2015 Red Hat Inc. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + + + + + The global interface exposing pointer constraining functionality. It + exposes two requests; lock_pointer for locking the pointer to its + position, and confine_pointer for locking the pointer to a region. + + The lock_pointer and confine_pointer creates the objects wp_locked_pointer + and wp_confined_pointer respectively, and the client can use these objects + to interact with the lock. + + For any surface, only one lock or confinement per seat may be active at + any time. If a lock or confinement is requested when another lock or + confinement is active or requested on that surface and seat, an + 'already_constrained' error will be raised. + + Warning! The protocol described in this file is experimental and + backward incompatible changes may be made. Backward compatible changes + may be added together with the corresponding interface version bump. + Backward incompatible changes are done by bumping the version number in + the protocol and interface names and resetting the interface version. + Once the protocol is to be declared stable, the 'z' prefix and the + version number in the protocol and interface names are removed and the + interface version number is reset. + + + + +These errors can be emitted in response to wp_pointer_constraints +requests. + + + + + + + The lock_pointer request lets the client disable absolute pointer + movements, locking the pointer to a position. In the future, when the + compositor deems implementation specific constraints are satisfied, the +